{
  "schemaVersion": 1,
  "slug": "time-tracking-calculator",
  "category": "productivity",
  "kind": "implementation",
  "independentValidation": false,
  "implementationHash": "06187e77f45fd57dd8d28142f34464de4124ad3540134dd89036abf7a4720aeb",
  "provenance": "Generated from the calculation contract used by the published page. Publication is not external validation.",
  "sourceFiles": [
    "data/calculators/time-tracking-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": "E = H × p ÷ 100 × R; P = E × w; L = 25 × (r ÷ 2) ÷ 60 × R + U × R",
    "vars": [
      [
        "H",
        "Total hours"
      ],
      [
        "p",
        "Billable share (%)"
      ],
      [
        "R",
        "Hourly rate"
      ],
      [
        "w",
        "Weeks"
      ],
      [
        "r",
        "Rounding increment (min)"
      ],
      [
        "U",
        "Unbilled hours"
      ]
    ],
    "note": "Billable hours = weekly hours × billable share; non-billable hours are the remainder. Earnings = billable hours × entered hourly rate. Projected earnings repeat that weekly estimate; the unrecorded-hours value = entered unrecorded hours × rate and is hypothetical, not verified billable loss."
  },
  "externalEvidence": null,
  "contract": {
    "compute": "const billableHours = hoursTotal*billablePercent/100; const nonBillableHours = hoursTotal-billableHours; const earnings = billableHours*hourlyRate; const lostToUnbilled = unbilledHours*hourlyRate; return { billableHours, nonBillableHours, earnings, projectedEarnings: earnings*weeks, lostToUnbilled };",
    "inputs": [
      {
        "name": "hoursTotal",
        "type": "number",
        "default": 38,
        "min": 0,
        "max": 168,
        "step": 0.1,
        "slider": true
      },
      {
        "name": "billablePercent",
        "type": "number",
        "default": 70,
        "min": 0,
        "max": 100,
        "step": 5,
        "slider": true
      },
      {
        "name": "hourlyRate",
        "type": "number",
        "default": 80,
        "min": 1,
        "max": 2000,
        "step": 5,
        "slider": true
      },
      {
        "name": "unbilledHours",
        "type": "number",
        "default": 2,
        "min": 0,
        "max": 60,
        "step": 0.5,
        "slider": true
      },
      {
        "name": "weeks",
        "type": "number",
        "default": 4,
        "min": 1,
        "max": 52,
        "step": 1,
        "slider": true
      }
    ],
    "outputs": [
      {
        "name": "billableHours",
        "precision": 2,
        "unit": "h"
      },
      {
        "name": "nonBillableHours",
        "precision": 2,
        "unit": "h"
      },
      {
        "name": "earnings",
        "precision": 2,
        "unit": "$"
      },
      {
        "name": "projectedEarnings",
        "precision": 0,
        "unit": "$"
      },
      {
        "name": "lostToUnbilled",
        "precision": 2,
        "unit": "$"
      }
    ],
    "interpret": null
  }
}
