Skip to content

Financial Independence, Retire Early (FIRE) calculator

Notifications You must be signed in to change notification settings

trenc/fire-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FIRE Calculator

A Financial Independence, Retire Early (FIRE) calculator built with vanilla JavaScript, Alpine.js, and TailwindCSS.

Features

  • Calculate years until financial freedom
  • Determine required capital and monthly savings
  • Consider inflation and taxes
  • Choose between perpetual withdrawal or capital depletion strategies
  • Consider additional pensions
  • Real-time calculations
  • Clean, responsive UI

Project Structure

fire-calculator/
├── index.html                 # Main HTML file
├── assets/js/
│   └── fire-calculator.js     # Calculator logic
│   └── alpinejs.X.X.X.min.js  # AlpineJS 
├── assets/css/
│   └── style.min.css          # Compiled TailwindCSS file
├── Makefile                   # Development server management
└── README.md                  # This file

Prerequisites

  • Python 3.x (for the built-in HTTP server)
  • Make (usually pre-installed on Unix systems)

Quick Start

Using Make (Recommended)

# Start the development server
make start

# Open in browser
make open

# Or do both at once
make dev

# Check server status
make status

# Stop the server
make stop

# Restart the server
make restart

Manual Start (Alternative)

# Start Python's built-in HTTP server
python3 -m http.server 8000

# Open browser to http://localhost:8000

Makefile Commands

Command Description
make help Show all available commands
make start Start the web server on port 8000
make stop Stop the running web server
make restart Restart the web server
make status Check if server is running
make open Open calculator in default browser
make dev Start server and open in browser, watch file changes for CSS
make clean Remove temporary files
make css Compile CSS from Tailwind classes
make watch Watch files for changes for compiling the CSS

Custom Port

You can specify a custom port:

make start PORT=3000

About

Financial Independence, Retire Early (FIRE) calculator

Resources

Stars

Watchers

Forks