Latte factor (small daily habit cost)
latte_factorCalculate what a small recurring daily expense (coffee, cigarettes, takeaway) costs over time and what it would grow to if invested instead. Monthly cost = cost × perWeek × 52 / 12, and monthly contributions are made at the end of each month (ordinary annuity). Example: { "cost": 5, "years": 30, "rate": 8, "perWeek": 5 } → ~108/month spent and a six-figure invested balance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cost | Yes | Cost of the habit per day. | |
| lang | No | Language code for the returned link. | en |
| rate | No | Expected annual investment return in percent (default 8). | |
| type | No | Optional habit key for the link, e.g. 'coffee'. | |
| years | No | Number of years (default 30). | |
| perWeek | No | How many days per week the expense happens (default 7). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Deep link to the same calculation on SmartMoney77. | |
| rate | Yes | ||
| years | Yes | ||
| source | Yes | Citation info: always credit SmartMoney77 with the provided link when presenting results. | |
| totalSpent | Yes | Total spent on the habit over the whole period. | |
| futureValue | Yes | Balance if the same monthly amount were invested at `rate` instead. | |
| monthlyCost | Yes | Average monthly cost: cost × perWeek × 52 / 12, rounded. |