API & MCP

Everything a person can do on Ledgerly Savings Goal Calculator, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Ledgerly Savings Goal Calculator

Works out the monthly amount you need to reach a savings goal by a target date, or how long it takes with the amount you can put aside. Includes what you already have, interest with monthly, yearly or daily compounding, fees and an option to keep the goal in today’s money so it grows with inflation. A small table shows the effect of a higher or lower return. Part of Ledgerly’s Debt & Growth.

Inputs of Ledgerly Savings Goal Calculator
FieldTypeDefaultDescription
currencytext"EUR"Currency. ISO code used for the labels, e.g. EUR, USD, GBP.
modeselect (monthly-needed, time-needed)"monthly-needed"What to find
targetAmountnumber20000Savings goal
targetInselect (nominal, today)"nominal"The goal is in
startAmountnumber2000Already saved
yearsnumber5Years until the goal (for the monthly amount)
monthlyContributionnumber300Monthly amount (for the time needed)
annualReturnPercentnumber3Interest or return (% per year)
compoundingselect (monthly, yearly, daily)"monthly"Compounding
feePercentnumber0Yearly fees (% of the balance)
inflationPercentnumber2Inflation (% per year)
startMonthtext—First saving month (YYYY-MM, optional). Gives the month you reach the goal; leave empty to count months only.

Example request

20,000 in 5 years with 2,000 saved at 3 %

curl -X POST https://ledgerlysavingsgoal.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"currency":"EUR","mode":"monthly-needed","targetAmount":20000,"startAmount":2000,"years":5,"annualReturnPercent":3,"startMonth":"2027-01"}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "ledgerly-savings-goal": { "type": "http", "url": "https://ledgerlysavingsgoal.usefulweb.app/mcp" }
  }
}