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 Compare page runs two entirely independent compound-interest projections simultaneously. Every input for Scenario A and Scenario B can be changed independently, and both results — the final balance tiles and the comparison chart — update instantly with each keystroke. No form submission is required.

Scenario Inputs

Each scenario form accepts the same four fields as the Calculator page. The forms are distinguished in the HTML using the data-scenario="a" and data-scenario="b" attributes, which the JavaScript in js/pages/compare.js uses to read inputs from each form independently.
startingBalance
number
The initial investment amount at time zero, in dollars. Defaults to $5,000 in both scenarios.
monthlyDeposit
number
The fixed dollar amount added every month. Defaults to 250/monthforScenarioAand250/month** for Scenario A and **500/month for Scenario B — making the default view a direct comparison of two different contribution rates.
annualRate
number
The estimated annual interest rate as a percentage. Defaults to 5% in both scenarios.
years
number
The projection period in whole years. Defaults to 20 years in both scenarios.

Final Balance Tiles

Two metric tiles display the projected final balance for each scenario:
  • Scenario A final — the balance at the end of Scenario A’s projection period, including all deposits and compounded interest.
  • Scenario B final — the same figure for Scenario B.
Both tiles update in real time as you change any input in either form.

Comparison Chart

The canvas bar chart rendered by drawComparisonChart() from js/lib/charts.js gives a visual breakdown of how each scenario’s final balance is composed. Each bar represents one scenario and is split into two stacked segments:
  • Principal (grey, bottom segment) — the total amount contributed: starting balance plus all monthly deposits over the projection period.
  • Interest earned (dark green, top segment) — the amount the investment gained purely through compounding, on top of the principal.
The total final balance is printed in dark green above each bar. Scenario labels (“Scenario A” and “Scenario B”) appear below the bars on the x-axis. The chart redraws automatically on window resize.

What to Compare

The Compare page is most useful for isolating the effect of a single variable. Some effective comparisons:
  • Same starting balance, different monthly deposits — see how much the contribution amount affects the final outcome. The default view (Scenario A at 250/movs.ScenarioBat250/mo vs. Scenario B at 500/mo) demonstrates this directly.
  • Same deposit, different annual rates — quantify the long-term impact of a higher expected return (e.g. a more aggressive vs. conservative portfolio).
  • Same deposit and rate, different timeframes — model what happens if you invest for 20 years versus 30 years at the same settings.
  • Effect of starting earlier vs. later — set identical parameters but reduce the years in one scenario to see how much a delayed start costs in final balance.
The Compare page does not save plans to localStorage. To save a specific scenario for later review, run it individually through the Calculator → Results flow and click Save Plan on the Results page.

Build docs developers (and LLMs) love