{
  "name": "Factory Calc API",
  "version": "1.1.0",
  "description": "Free JSON API for practical calculators: FERS pension, child tax credit, TSP growth, 529 savings, unemployment benefits, overtime pay. Built for AI agents; each answer includes a step-by-step breakdown and a link to the human calculator page.",
  "usage": "POST JSON inputs to any endpoint. No key required. Responses include answer, breakdown, steps, source_url, and disclaimer.",
  "openapi": "/openapi.json",
  "mcp": "/mcp.json",
  "tools": {
    "fers": {
      "name": "FERS Pension Estimator",
      "description": "Estimate a federal employee's FERS annuity under 5 USC 8415, including the 1.1% multiplier rule and survivor reductions.",
      "endpoint": "/v1/fers",
      "method": "POST",
      "inputs": {
        "high3": {
          "type": "number",
          "description": "High-3 average salary in dollars",
          "required": true
        },
        "years": {
          "type": "number",
          "description": "Years of creditable service",
          "required": true
        },
        "age": {
          "type": "number",
          "description": "Current age",
          "required": true
        },
        "survivor": {
          "type": "string",
          "enum": [
            "none",
            "partial",
            "max"
          ],
          "description": "Survivor annuity election",
          "required": false
        }
      },
      "example_request": {
        "high3": 95000,
        "years": 27,
        "age": 62,
        "survivor": "max"
      },
      "human_calculator": "https://factory-ferscalc.pages.dev/"
    },
    "ctc": {
      "name": "Child Tax Credit Estimator (2026)",
      "description": "Estimate the 2026 Child Tax Credit, additional child tax credit (refundable part), and other dependent credit, with phaseouts.",
      "endpoint": "/v1/ctc",
      "method": "POST",
      "inputs": {
        "filing_status": {
          "type": "string",
          "enum": [
            "single",
            "mfj",
            "mfs",
            "hoh",
            "qss"
          ],
          "required": true
        },
        "agi": {
          "type": "number",
          "description": "Modified adjusted gross income",
          "required": true
        },
        "qualifying_children": {
          "type": "integer",
          "description": "Children qualifying for the full child tax credit",
          "required": true
        },
        "other_dependents": {
          "type": "integer",
          "description": "Other dependents (credit for other dependents)",
          "required": false
        },
        "earned_income": {
          "type": "number",
          "description": "Earned income for the ACTC phase-in; defaults to agi",
          "required": false
        }
      },
      "example_request": {
        "filing_status": "mfj",
        "agi": 120000,
        "qualifying_children": 2,
        "other_dependents": 0
      },
      "human_calculator": "https://factory-ctccalc.pages.dev/"
    },
    "tsp": {
      "name": "TSP Growth Calculator",
      "description": "Project a Thrift Savings Plan balance with monthly compounding, including FERS agency automatic and matching contributions.",
      "endpoint": "/v1/tsp",
      "method": "POST",
      "inputs": {
        "balance": {
          "type": "number",
          "description": "Current TSP balance",
          "required": true
        },
        "salary": {
          "type": "number",
          "description": "Annual salary in dollars",
          "required": true
        },
        "annual_contribution": {
          "type": "number",
          "description": "Your yearly TSP contribution in dollars",
          "required": true
        },
        "agency": {
          "type": "string",
          "enum": [
            "fers",
            "csrs",
            "none"
          ],
          "description": "fers = FERS/BRS with agency money; csrs/none = your money only",
          "required": true
        },
        "years": {
          "type": "number",
          "description": "Years to project",
          "required": true
        },
        "annual_rate_pct": {
          "type": "number",
          "description": "Assumed annual return in percent, e.g. 7",
          "required": true
        }
      },
      "example_request": {
        "balance": 50000,
        "salary": 90000,
        "annual_contribution": 9000,
        "agency": "fers",
        "years": 20,
        "annual_rate_pct": 7
      },
      "human_calculator": "https://factory-tspcalc.pages.dev/"
    },
    "college529": {
      "name": "529 College Savings Planner",
      "description": "Project a 529 plan balance with monthly contributions, a lump sum, and state tax savings.",
      "endpoint": "/v1/college529",
      "method": "POST",
      "inputs": {
        "balance": {
          "type": "number",
          "description": "Current 529 balance",
          "required": false
        },
        "monthly": {
          "type": "number",
          "description": "Monthly contribution (default 500)",
          "required": false
        },
        "lump": {
          "type": "number",
          "description": "One-time lump sum today",
          "required": false
        },
        "years": {
          "type": "number",
          "description": "Years until college (default 18)",
          "required": false
        },
        "annual_rate_pct": {
          "type": "number",
          "description": "Assumed annual return in percent (default 7)",
          "required": false
        },
        "state_tax_rate_pct": {
          "type": "number",
          "description": "State income tax rate in percent for the deduction estimate (default 5)",
          "required": false
        }
      },
      "example_request": {
        "balance": 5000,
        "monthly": 300,
        "lump": 0,
        "years": 15,
        "annual_rate_pct": 7,
        "state_tax_rate_pct": 5
      },
      "human_calculator": "https://factory-529calc.pages.dev/"
    },
    "unemployment": {
      "name": "Unemployment Benefits Estimator",
      "description": "Estimate a weekly unemployment benefit for any US state from base-period quarterly wages (1/26 of the highest quarter, capped at the state maximum).",
      "endpoint": "/v1/unemployment",
      "method": "POST",
      "inputs": {
        "state": {
          "type": "string",
          "description": "State name or 2-letter abbreviation",
          "required": true
        },
        "q1": {
          "type": "number",
          "description": "Base-period quarter 1 wages",
          "required": true
        },
        "q2": {
          "type": "number",
          "description": "Base-period quarter 2 wages",
          "required": true
        },
        "q3": {
          "type": "number",
          "description": "Base-period quarter 3 wages",
          "required": true
        },
        "q4": {
          "type": "number",
          "description": "Base-period quarter 4 wages",
          "required": true
        }
      },
      "example_request": {
        "state": "GA",
        "q1": 12000,
        "q2": 12000,
        "q3": 12000,
        "q4": 12000
      },
      "human_calculator": "https://factory-unemploymentcalc.pages.dev/"
    },
    "overtime": {
      "name": "Overtime Pay Calculator",
      "description": "Weekly gross pay with overtime under federal FLSA rules or California daily-overtime rules. Supports hourly pay, two rates (weighted average), and salaried workers.",
      "endpoint": "/v1/overtime",
      "method": "POST",
      "inputs": {
        "rules": {
          "type": "string",
          "enum": [
            "federal",
            "california"
          ],
          "required": true
        },
        "basis": {
          "type": "string",
          "enum": [
            "hourly",
            "salary"
          ],
          "required": true
        },
        "total_hours": {
          "type": "number",
          "description": "Total hours this week (federal rules)",
          "required": false
        },
        "days": {
          "type": "array",
          "description": "7 numbers, hours per day Mon-Sun (California rules)",
          "required": false
        },
        "hourly_rate": {
          "type": "number",
          "description": "Hourly rate (basis=hourly)",
          "required": false
        },
        "second_rate": {
          "type": "number",
          "description": "Optional second hourly rate",
          "required": false
        },
        "second_rate_hours": {
          "type": "number",
          "description": "Hours worked at the second rate",
          "required": false
        },
        "weekly_salary": {
          "type": "number",
          "description": "Weekly salary (basis=salary)",
          "required": false
        },
        "salary_covers": {
          "type": "string",
          "enum": [
            "all",
            "first40"
          ],
          "description": "Whether salary covers all hours or the first 40 (basis=salary)",
          "required": false
        }
      },
      "example_request": {
        "rules": "federal",
        "basis": "hourly",
        "total_hours": 50,
        "hourly_rate": 25
      },
      "human_calculator": "https://factory-overtimecalc.pages.dev/"
    }
  }
}