{
  "schemaVersion": 1,
  "slug": "paycheck-calculator",
  "category": "finance",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "cfad2543ae08b66de0d0cd31fcce0bff03cdf30896b3363895cfad4cbfe8a038",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/paycheck-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": "R = G p ÷ 100; tax = (G − R) t ÷ 100; net = G − R − tax − O",
    "vars": [
      [
        "G",
        "Gross pay"
      ],
      [
        "p",
        "Retirement contribution (%)"
      ],
      [
        "t",
        "Income tax rate (%)"
      ],
      [
        "O",
        "Other deductions"
      ]
    ],
    "note": "Net pay = gross − retirement contribution − estimated flat tax on gross after retirement contribution − other deductions. This is a simplified estimate, not jurisdiction-specific withholding."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const retirement=grossPay*retirementPercent/100,taxable=grossPay-retirement,tax=taxable*taxRate/100;if(retirement+tax+otherDeductions>grossPay)return{netPay:null,taxPaid:null,retirement:null,totalDeductions:null,__error:'inputError'};return{netPay:grossPay-tax-retirement-otherDeductions,taxPaid:tax,retirement,totalDeductions:tax+retirement+otherDeductions};",
    "inputs": [
      {
        "name": "grossPay",
        "type": "number",
        "default": 5000,
        "min": 0,
        "max": 10000000,
        "step": 100
      },
      {
        "name": "taxRate",
        "type": "number",
        "default": 22,
        "min": 0,
        "max": 100,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "retirementPercent",
        "type": "number",
        "default": 5,
        "min": 0,
        "max": 100,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "otherDeductions",
        "type": "number",
        "default": 100,
        "min": 0,
        "max": 1000000,
        "step": 10
      }
    ],
    "outputs": [
      {
        "name": "netPay",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "taxPaid",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "retirement",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "totalDeductions",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
