# Forecasting Growth and Lead Time — Cost & Capacity Estimation

Source: https://www.skillbyai.com/en/capacity-estimation/ce-forecasting-headroom

> Project future demand from growth rates and order capacity ahead of when it is needed.

## Plan for the future peak

Capacity planning asks not only 'what do we need now?' but '**what will we need by the time new capacity is ready?**'. Start from current peak usage per resource. Apply a **growth model**: for steady products, a monthly growth rate compounding over time; for launches and campaigns, explicit step increases. Then account for **lead time**: autoscaling stateless servers takes minutes, but resizing a database, adding shards, raising a provider quota or buying hardware can take days to months. The planning rule is simple: when forecast peak usage plus headroom will exceed provisioned capacity within the lead time, act now. Compounding is easy to underestimate: 10% monthly growth roughly triples usage in a year. Revisit forecasts regularly against actual metrics and widen the margin when the forecast is uncertain.

## When do we run out?

Months until a resource crosses its safe limit under compound growth.

```python
current_peak = 12_000      # QPS
safe_capacity = 30_000     # QPS at target utilisation
monthly_growth = 0.08

month, peak = 0, current_peak
while peak <= safe_capacity:
    month += 1
    peak *= 1 + monthly_growth
print(f"capacity exceeded in month {month} (peak ~ {peak:,.0f} QPS)")
print(f"12-month multiplier: {(1 + monthly_growth) ** 12:.2f}x")
```

Output:

```
capacity exceeded in month 12 (peak ~ 30,218 QPS)
12-month multiplier: 2.52x
```

## Booking train tickets for Diwali

You do not wait until the day before Diwali to book a train home; reservations open months ahead and sell out. Database and quota changes have similar lead times, so you book capacity before the rush.

**Quiz:** Usage grows 10% per month, compounding. Roughly how much larger is it after 12 months?

- [ ] About 1.2x
- [x] About 3.1x
- [ ] About 2x
- [ ] About 12x

*Answer:* About 3.1x. 1.1^12 is about 3.14. Compounding makes growth much faster than the simple 12 x 10% = 120% you might guess.
