Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/apursley2012/airgead-investment-calculator/llms.txt

Use this file to discover all available pages before exploring further.

The Calculator page is the primary entry point for Airgead. It accepts four inputs and shows a live animated balance while you type — no submit button is required to see the preview. Every keystroke immediately recalculates the projection and smoothly animates the displayed balance, so you can explore different scenarios in real time.

The Four Inputs

Each field maps directly to a variable in the compound interest formula. All four fields are required and pre-filled with sensible defaults so you can see a meaningful result as soon as the page loads.
startingBalance
number
default:"5000"
The initial investment amount at time zero, in dollars. This is the lump sum you are placing into the investment before any monthly contributions begin. Accepts whole dollar amounts; the step size is $100. Minimum value is 0.
monthlyDeposit
number
default:"250"
The fixed dollar amount added to the investment at the end of every month throughout the entire projection period. Set this to 0 to model a one-time lump-sum investment with no ongoing contributions. The step size is $25. Minimum value is 0.
annualRate
number
default:"5"
The estimated annual interest rate expressed as a percentage (e.g. enter 7 for 7%). The calculator converts this to a monthly rate internally by dividing by 12. The step size is 0.1 percentage points. Minimum value is 0.
years
number
default:"20"
The projection period in whole years. The calculation runs month by month for the full number of years entered, then presents an annual summary. Minimum value is 1; maximum is 80.

Input Validation

Negative values for any field are automatically clamped to zero. The years value is rounded to the nearest whole number and capped at a maximum of 80. These rules are enforced in js/lib/calculator.js inside the calculateCompoundInterest() function before any arithmetic is performed, so the preview always reflects a valid calculation even if you type an out-of-range value.

Live Preview

As you change any field, three values update instantly below the form without requiring a page submission:
  • With monthly deposits — the large animated figure at the top of the page. This is the projected final balance after compounding the starting balance and all monthly deposits for the full number of years at the given rate. The number animates with a smooth ease-out curve over 650 ms whenever it changes.
  • Without deposits — a quick-stat showing what the starting balance alone would grow to over the same period and at the same rate, with no ongoing contributions.
  • Difference — a quick-stat showing how much more the deposit scenario produces compared to the no-deposit scenario (displayed with a + prefix).

The Notice Line

Directly below the quick stats, a notice line reads:
“You earn $X more by contributing monthly.”
This line updates automatically alongside the live preview. The dollar amount it cites matches the Difference quick-stat exactly.

Viewing Detailed Results

Once you are satisfied with your inputs, click View Details to proceed to the full Results page.
1

Click View Details

Submitting the form triggers the submit event handler in js/pages/calculator.js.
2

Calculation is saved

The current inputs and the full year-by-year results array are serialized to JSON and written to localStorage under the key airgead_current_calc.
3

Navigate to Results

The browser navigates to results.html, which reads airgead_current_calc on load to display the detailed breakdown.

Default Values

The form loads with the following pre-filled defaults so you can see a representative projection immediately:
FieldDefault value
Starting balance$5,000
Monthly deposit$250 / month
Annual rate5%
Years20 years

Build docs developers (and LLMs) love