{
  "schemaVersion": 1,
  "slug": "hourly-rate-calculator",
  "category": "productivity",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "3233515a48e9a61a104b64309f41723b29d461f44485df94cd1020dc6ea68527",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/hourly-rate-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": "G = N ÷ (1 − t) ; R = G + C ; H = w × h × (b ÷ 100) ; rate = R ÷ H",
    "vars": [
      [
        "N",
        "target take-home income"
      ],
      [
        "t",
        "effective tax rate (%)"
      ],
      [
        "C",
        "annual business costs"
      ],
      [
        "w",
        "weeks worked/year"
      ],
      [
        "h",
        "hours/week"
      ],
      [
        "b",
        "billable share (%)"
      ],
      [
        "R",
        "required annual revenue"
      ]
    ],
    "note": "Assumes one flat effective tax rate applied to target take-home income and that business costs are deductible before tax. This is a pricing scenario, not tax advice; progressive taxes, social contributions and local rules are not modeled."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const grossNeeded = taxRate > 0 ? targetIncome/(1-taxRate/100) : targetIncome; const totalNeeded = grossNeeded+businessCosts; const billableHours = weeksPerYear*hoursPerWeek*(billablePercent/100); const hourlyRate = billableHours > 0 ? totalNeeded/billableHours : 0; return { grossNeeded, totalNeeded, billableHours, hourlyRate, dayRate: hourlyRate*8, monthlyRate: totalNeeded/12 };",
    "inputs": [
      {
        "name": "targetIncome",
        "type": "number",
        "default": 80000,
        "min": 0,
        "max": 2000000,
        "step": 1000
      },
      {
        "name": "businessCosts",
        "type": "number",
        "default": 12000,
        "min": 0,
        "max": 500000,
        "step": 500
      },
      {
        "name": "weeksPerYear",
        "type": "number",
        "default": 46,
        "min": 1,
        "max": 52,
        "step": 1,
        "slider": true
      },
      {
        "name": "hoursPerWeek",
        "type": "number",
        "default": 40,
        "min": 1,
        "max": 100,
        "step": 1,
        "slider": true
      },
      {
        "name": "billablePercent",
        "type": "number",
        "default": 60,
        "min": 10,
        "max": 100,
        "step": 5,
        "slider": true
      },
      {
        "name": "taxRate",
        "type": "number",
        "default": 25,
        "min": 0,
        "max": 60,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "hourlyRate",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "grossNeeded",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "totalNeeded",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "billableHours",
        "precision": 0,
        "unit": "h"
      },
      {
        "name": "dayRate",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "monthlyRate",
        "precision": 0,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
