FIRE API

Free, no-registration API for FIRE calculations and financial datasets

Getting Started

All API endpoints return JSON. No API key required for non-commercial use. Rate limit: 100 requests/hour per IP.

GET /api/v1/fire-number

Calculate your FIRE number and years to financial independence.

GET /api/v1/fire-number?expenses=40000&withdrawalRate=4&savingsRate=50¤tAge=30¤tSavings=50000&expectedReturn=7

{
  "fireNumber": 1000000,
  "yearsToFire": 17.2,
  "retirementAge": 47.2,
  "annualSavingsNeeded": 0
}

Parameters: expenses (required), withdrawalRate (default: 4), savingsRate, currentAge, currentSavings, expectedReturn (default: 7)

GET /api/v1/compound-interest

Project investment growth with compound interest.

GET /api/v1/compound-interest?principal=10000&contribution=5000&rate=7&years=20

{
  "futureValue": 243000,
  "totalContributions": 110000,
  "interestEarned": 133000
}

GET /api/v1/monte-carlo

Run 5,000 retirement simulations to stress-test your plan.

GET /api/v1/monte-carlo?balance=1000000&withdrawal=40000&return=7&volatility=15&years=30

{
  "successRate": 95.2,
  "medianBalance": 850000,
  "percentile10": 120000,
  "percentile90": 2400000
}

⚠️ This endpoint is computationally intensive. Rate limit: 10 requests/hour.

GET /api/v1/tax-brackets

Get tax bracket data for all supported countries.

GET /api/v1/tax-brackets

{
  "countries": [
    {
      "country": "United States",
      "capitalGainsTax": "0-20% (LTCG)",
      "dividendTax": "0-20% (qualified)",
      "incomeTax": "10-37% federal + state",
      "taxAdvantagedAccounts": ["401(k) — $24,500/year"]
    }
  ]
}

GET /api/v1/cost-of-living

Monthly cost of living data for 60+ cities worldwide.

GET /api/v1/cost-of-living

{
  "countries": [
    {
      "country": "Japan",
      "cities": [
        { "name": "Tokyo", "monthlySingle": 250000, "monthlyFamily": 450000 }
      ]
    }
  ]
}

GET /api/v1/historical-returns

S&P 500 historical return data and worst-case sequences.

GET /api/v1/historical-returns

GET /api/v1/expense-ratios

ETF expense ratio database.

GET /api/v1/expense-ratios

Rate Limits & Licensing

  • Non-commercial: 100 requests/hour per IP. No API key required.
  • Commercial: Please contact us for licensing. Data is CC BY-NC 4.0 by default.
  • Caching: Static data endpoints (tax-brackets, cost-of-living etc.) can be cached indefinitely. Computation endpoints should not be cached.
  • Attribution: If you use our API in a public application, please link to TorchFI.

SDK & Libraries

JavaScript library available:

npm install firecalc-api
# or
import { fireNumber, monteCarlo } from 'https://thetorchfi.com/js/finance.js'