Skip to content

sandseb123/FirePath-Core

Repository files navigation

FirePath-Core

Your retirement numbers are yours. No account. No server. No data upload. Ever.

A local-first FIRE calculator with 8 withdrawal models, 10,000-run Monte Carlo simulation, and a delta engine that tells you exactly what to change to retire earlier — all in a single HTML file you can open offline.

FirePath-Core screenshot


🔒 Your data never leaves your machine

FirePath-Core runs entirely in your browser. There is no server. No account. No analytics. No ads. Your portfolio size, retirement age, and financial details never leave your device.

Verify it yourself:

grep -r "fetch\|XMLHttpRequest\|WebSocket" .
# Returns nothing. Zero network calls in the codebase.

Open fire_calculator.html with WiFi off. It still works completely.

We built it this way because your retirement numbers shouldn't be a sales lead.

Why this matters: The #1 FIRE calculator in paid search shares your financial data with a "provider network" of lenders and partners who can call you even if you're on the Do Not Call list — sourced from their own privacy policy. FirePath-Core is architecturally incapable of doing this. There is no server to share data from.

Privacy vs Cloud Tools

FirePath-Core Cloud tools
No account required ✅ Open the file and use it ❌ Email required
Works fully offline ✅ Disconnect WiFi and test it ❌ Cloud-dependent
Data stored locally ✅ Your browser only ❌ Their servers
No ad tracking ✅ Zero cookies, zero analytics ❌ Third-party ad partners
No lender data sharing ✅ We never receive your data ❌ Shared with "provider network"
Verifiable privacy grep the source in 30 seconds ❌ Trust their policy
Open source (MIT) ✅ Fork it, audit it, self-host ❌ Proprietary
Free forever ✅ Core is always free ❌ $12/month after trial

Features

8 Withdrawal Models — with plain-English explanations

Every model includes a one-sentence explainer so you understand what you're actually modeling, not just a name.

Model Best For
Bengen 4% Rule Default starting point. Most widely cited. Withdraw 4% in year 1, adjust for inflation annually.
Conservative 3% Rule Early retirees with 40–50 year horizons. Same as 4% rule but more conservative.
Guardrails (Guyton-Klinger) Adaptive spending. Cuts spending in bad years, increases in good years. Allows higher initial rate (~5%).
Fixed Dollar Predictable income. Withdraw the same dollar amount every year regardless of portfolio performance.
Fixed Percentage Portfolio can never hit zero. Withdraw a fixed % of current balance — spending varies with markets.
Variable Percentage (VPW) Longevity-aware. Withdrawal % increases with age. From the Bogleheads community.
Floor & Upside Risk management. Guaranteed income floor from safe assets + variable upside from equities.
CAPE-Based Dynamic Market-condition aware. Adjusts withdrawal rate based on current Shiller P/E ratio.

Monte Carlo Simulation — 10,000 runs

Runs 10,000 simulations of your retirement, each with a different random sequence of market returns, to show you the range of possible outcomes.

  • p90 — "What could go right" — best 10% of market scenarios
  • p50 — "The median path" — typical market environment
  • p10 — "What could go wrong" — worst 10%, similar to retiring in 1929 or 2000

Why 10,000 runs matters: At 1,000 runs, your p10 band shifts visibly on every refresh — making results feel unreliable. At 10,000 runs, results are stable to within 0.5%. At 50,000 runs, results are essentially deterministic. FirePath-Core defaults to 10,000 and lets you choose.

Results are shown in plain English:

"87 out of 100 simulated retirements still had money at age 82. The 13 that ran out did so between age 74–79, mostly in scenarios with a severe market downturn in the first 5 years of retirement."

Delta Engine — Real-time sensitivity analysis

After every calculation, FirePath-Core tells you exactly what to change to retire earlier. Not just results — recommendations.

"Your biggest lever: saving $480/month more moves your FIRE date 2 years earlier. Cutting $4,000/year in spending gets you there 1.5 years sooner. Doing both: age 43 instead of 46."

Levers are ranked by impact. Controllable inputs (savings, spending) come before market-dependent ones (return rate).

Assumption Inspector

Every assumption the calculator uses is visible in one panel — never hidden.

Shows: nominal return, inflation, real return (calculated), SWR definition, retirement duration, tax model status, Social Security inclusion, sequence risk method.

Includes a "Why your result differs" comparator explaining how assumptions differ between FirePath, cFIREsim, and other tools — directly addressing the #1 community complaint: "I got different answers from two calculators."

Scenario Library — 8 named life event templates

Pre-built templates for the life events most FIRE calculators ignore:

  • Kid in 3 years — childcare spike + 18-year expense increase
  • 1-year sabbatical — zeros savings for 12 months, shows FIRE date cost
  • Barista income at 45 — part-time income reduces required portfolio
  • Move to lower-cost state — COL multipliers for TX, FL, TN, MT vs CA baseline
  • Early Social Security (62) — breakeven analysis vs 67 vs 70
  • Healthcare cost shock — one-time $50k expense, shows success rate impact
  • Market crash now — 30% portfolio drop, shows sequence risk effect
  • Partner income loss — removes second income from a specified year

Named Scenario Workflows

Guided calculation modes for the four most common FIRE questions:

  • Coast FIRE — "If I stop saving today, does compound growth get me there?"
  • Barista FIRE — "If I semi-retire and earn $24k/year, how does that change my timeline?"
  • Career Break — "What does a 12-month sabbatical cost my FIRE date?"
  • Geo-Arbitrage — "If I retire in Portugal at 55% of my US expenses, when can I retire?"

Shareable Assumption Files

Export your modeling assumptions as a .fire-assumptions.json file. Share it on Reddit so others can verify your math with identical parameters.

The file contains only modeling parameters — return rate, inflation, SWR model, retirement duration, tax rate, Monte Carlo seed. No financial values. Safe to share publicly.


Getting Started

# Clone the repo
git clone https://github.com/sandseb123/FirePath-Core.git
cd FirePath-Core

# Install dev dependencies (for tests only)
npm install

# Run tests
npm test

# Build (bundles fire_math.js into fire_calculator.html)
node build.js

Then open fire_calculator.html in any browser. No server required. Works fully offline — no internet connection needed after cloning.


Usage

Essentials Mode (default)

Five inputs. Works for most users.

Input Plain English Label
Current savings How much have you saved so far?
Monthly savings How much do you save each month?
Annual spending How much do you spend per year?
Current age How old are you?
Target retirement age When do you want to retire?

Advanced Mode

Toggle to unlock 15+ inputs: portfolio return, inflation, asset allocation, Social Security, other income, tax rate, sequence risk buffer, and more.

Reading Your Results

FIRE Number — the portfolio size that supports your spending indefinitely at your chosen withdrawal rate.

Years to FIRE — how long at your current savings rate.

Success Rate — shown as "X out of 100 simulated retirements succeeded", not as a percentage. The plain-English framing matters.

Your biggest lever — the delta engine recommendation shown below results. This is the most actionable number on the screen.


Project Structure

fire_math.js           # Pure calculation engine — no DOM, fully testable
fire_calculator.html   # Self-contained UI with all libraries bundled inline
build.js               # Bundles fire_math.js into fire_calculator.html
package.json           # Dev dependencies (Jest for testing only)
tests/                 # 11 test suites covering all strategies and engines
models/                # One JS file per withdrawal model

Why single-file? The entire app is human-readable in one view — no build artifacts, no minification, no bundler obscuring what the code does. This is how the grep privacy test stays clean.


Tests

npm test

Covers all 8 withdrawal models, Monte Carlo simulation, delta engine, assumption inspector, and end-to-end scenario workflows.


Withdrawal Model Deep Dives

Why the 4% Rule Isn't Enough

The 4% rule was developed by William Bengen in 1994 from 30-year US market history. It's a reasonable starting point — but it's one data point, built on one country's market, for one retirement duration.

Early retirees need 40–50 year horizons. International retirees have different market histories. People with flexibility can do better with adaptive models like Guardrails. People who want predictability need Fixed Dollar.

FirePath-Core gives you all 8. You pick the one that matches your situation.

Understanding Sequence of Returns Risk

Two retirees with identical 30-year average returns can have completely different outcomes depending on when the bad years happen.

If markets crash in year 1 of retirement and you're withdrawing money, you sell shares at the bottom. Those shares never recover for you. This is sequence of returns risk — and it's why Monte Carlo matters more than average return projections.

The p10 band in FirePath-Core shows you the scenario where you retire in a year like 2000 or 1929. That's the number to plan for.

Monte Carlo — 1k vs 10k vs 50k

Runs p10/p90 stability Speed When to use
1,000 Noisy — shifts ±2–3% on refresh ~20ms Quick gut-check only
10,000 Solid — shifts <0.5% on refresh ~150ms Default — all users
50,000 Rock solid ~750ms Final decisions, sharing results

Default is 10,000. Change in Advanced Mode.


Frequently Asked Questions

Why not just use a spreadsheet? Spreadsheets are great. The Monte Carlo simulation is the one thing that's genuinely annoying to build yourself — 10,000 random return sequences with stable percentile bands. FirePath-Core packages that cleanly.

Why doesn't it connect to my brokerage account? By design. Pro CSV import (free) lets you upload your brokerage export and parse it locally. No OAuth, no API keys, no your data on our servers. FirePath-Pro adds live Polygon.io price sync for the desktop app.

How is this different from cFIREsim? cFIREsim uses real historical return sequences from 1871 — it tests your plan against every 30-year window in actual market history. FirePath-Core uses simulated returns based on your input assumptions. They answer slightly different questions. cFIREsim is more conservative for sequence risk; FirePath-Core is better for modeling your specific assumptions. The Assumption Inspector explains this difference in-app.

What does "87% success rate" mean? 87 out of 100 simulated retirements still had money at the end of the retirement period. The 13 that failed ran out of money — meaning the portfolio hit $0 before the end of the planned retirement duration. FirePath-Core always shows this in plain English, never just a percentage.

Can I share my results? Export your assumptions as a .fire-assumptions.json file. Anyone can import it and reproduce your exact calculation. The file contains only modeling parameters — no financial values.


FirePath-Pro

FirePath-Core is the open-source foundation. FirePath-Pro is a Tauri desktop app ($49 one-time) that adds:

  • Live portfolio sync via Polygon.io (free tier, user provides their own key)
  • Holdings tracking with previous-day close prices
  • Real SQLite storage at ~/.firepath/fire.db
  • Social Security estimator
  • Tax-aware projections (Roth conversions, IRMAA, capital gains harvesting)
  • Historical backtesting against every 30-year window since 1871
  • Partner/joint planning

Pro's privacy guarantee: Polygon.io API calls go directly from your machine to api.polygon.io — not through any server we control. Only ticker symbols are transmitted. Your portfolio size, share count, and financial data never leave your machine. The network allowlist in tauri.conf.json permits only api.polygon.io. Auditable in the source code.

🔗 Waitlist: firepath.dev/waitlist — join to get notified when Pro launches.


Community

Built for and with the FIRE community.

Found a bug? Open an issue. Want to add a withdrawal model? See CONTRIBUTING.md. Have a Garmin .fit file parser? We'd love a PR.


Contributing

FirePath-Core is MIT licensed and actively maintained.

The most valuable contributions:

  • New withdrawal models — follow the interface in models/. Each model is one file: calculate(inputs) → results.
  • Brokerage CSV parsers — Fidelity, Vanguard, Schwab formats already supported. Merrill Lynch, E*Trade, and others welcome.
  • Actuarial data updates — SSA tables updated annually.
  • Bug reports — especially wrong math. Open an issue with your inputs and expected vs actual output.
# Run tests before submitting a PR
npm test

# The grep test must still pass after your changes
grep -r "fetch\|XMLHttpRequest\|WebSocket" src/
# Must return nothing

Disclosure

FirePath-Core was built with AI assistance (Claude by Anthropic). All calculations have been verified against academic sources and tested against known reference values. The math in fire_math.js is open source — audit it, test it, improve it.


License

MIT — see LICENSE


No account required · Your data stays on your device github.com/sandseb123/FirePath-Core

About

Fire Calculator for financial Independence

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors