{
  "schemaVersion": 1,
  "slug": "tattoo-size-calculator",
  "category": "household",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "ad8dfd5de5a682f9da1d76d3f3ee5280e4a2cd327f1ef515da92bafef22822f5",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/tattoo-size-calculator.json",
    "src/engine.js"
  ],
  "runtimeSource": "/sources/engine.txt",
  "runtimeHash": "5c888d8898afbdee36267bb9977829e1e2ac568f6677c8ee87469c139864645c",
  "scope": "The compute function records implemented equations, constants, lookup tables and custom rules. Inputs record defaults and allowed values; outputs record precision and units. Defaults are examples, not recommendations. General background references are not evidence for this specific algorithm.",
  "publishedFormula": {
    "formula": "H = max(0.25, 0.012LWd)",
    "vars": [
      [
        "L",
        "Length (in)"
      ],
      [
        "W",
        "Width (in)"
      ],
      [
        "d",
        "Detail factor"
      ],
      [
        "H",
        "Tattoo time (hours)"
      ]
    ],
    "note": "Area = length × width. Estimated hours = max(0.25, area × 0.012 × detail factor); price = max(user minimum, hours × user hourly rate), with both monetary inputs in the same user-selected currency. Sessions = ceiling(hours ÷ 6); estimates are planning assumptions."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const D = { linework:0.6, medium:1, detailed:1.6, realism:2.2 }; const area = lengthIn*widthIn; const hours = Math.max(0.25, area*0.012*(D[detail] || 1)); const price = Math.max(minCharge, hours*hourlyRate); const sizeClass = area < 4 ? 'Small — under about 2 in × 2 in' : area < 16 ? 'Medium — up to about 4 in × 4 in' : area < 40 ? 'Large — up to about 6 in × 7 in' : 'Extra large — plan multiple sessions'; return { area, hours, price, sessions: Math.ceil(hours/6), sizeClass };",
    "inputs": [
      {
        "name": "lengthIn",
        "type": "number",
        "default": 4,
        "min": 0.2,
        "max": 40,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "widthIn",
        "type": "number",
        "default": 3,
        "min": 0.2,
        "max": 40,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "detail",
        "type": "select",
        "default": "medium",
        "options": [
          {
            "value": "linework"
          },
          {
            "value": "medium"
          },
          {
            "value": "detailed"
          },
          {
            "value": "realism"
          }
        ]
      },
      {
        "name": "hourlyRate",
        "type": "number",
        "default": 150,
        "min": 0,
        "max": 1000,
        "step": 5,
        "slider": true
      },
      {
        "name": "minCharge",
        "type": "number",
        "default": 100,
        "min": 0,
        "max": 1000,
        "step": 10,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "area",
        "precision": 2,
        "unit": "sq in"
      },
      {
        "name": "hours",
        "precision": 1,
        "unit": "h"
      },
      {
        "name": "price",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "sessions",
        "precision": 0,
        "unit": ""
      },
      {
        "name": "sizeClass",
        "precision": 0,
        "unit": "",
        "type": "text"
      }
    ],
    "interpret": null
  }
}
