# Payback Period Calculator

> Computes how long an investment takes to recover its initial outlay from a list of periodic cash flows or a constant annual cash flow, both undiscounted (simple payback) and discounted at a given rate (discounted payback), interpolating within the recovery period.

- Calculator id: `payback-period` · Category: Finance (`finance`) · Tool name: `calculate_payback_period`
- Canonical page: https://tttkmbb.com/finance/payback-period · This document: https://tttkmbb.com/finance/payback-period.md · JSON definition: https://tttkmbb.com/finance/payback-period.json

## Purpose

Computes how long an investment takes to recover its initial outlay from a list of periodic cash flows or a constant annual cash flow, both undiscounted (simple payback) and discounted at a given rate (discounted payback), interpolating within the recovery period.

**Use when:** You want a quick liquidity/risk measure of a project: the years until cumulative cash inflows equal the initial investment.

**Do not use when:** You need the value created over the whole life (use npv) or the rate of return (use irr); payback ignores cash flows after recovery.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `initial_investment` | number |  | required | Outlay at time 0, entered as a positive number. (> 0, max 1000000000000000) |
| `cash_flows` | number_list |  | optional | Net cash inflow at the end of each period; takes precedence over annual_cash_flow. |
| `annual_cash_flow` | number |  | optional | Used with `years` when cash_flows is omitted. (> 0, max 1000000000000000) |
| `years` | integer | years | optional, default 20 | Length of the constant cash-flow series (ignored when cash_flows is given). (min 1, max 60) |
| `discount_rate_percent` | number | % per period | optional, default 0 | Rate for the discounted payback; 0 skips it. (min 0, max 100) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `payback_period_years` | number | periods | Periods until cumulative undiscounted cash flow reaches the investment, interpolated within the final period. |
| `payback_time` | string |  | payback_period_years expressed in years and months. |
| `discounted_payback_period_years` | number | periods | Same using cash flows discounted at discount_rate_percent (only when the rate is > 0). |
| `payback_reached` | boolean |  | False when the cash flows never add up to the investment. |
| `cumulative_cash_flows` | number_list |  | Running total of undiscounted cash flows after each period. |
| `total_cash_flows` | number |  | Σ cash flows over the series. |

## Formula

`Simple: payback = (k − 1) + (initial_investment − cumulative_{k−1}) / CF_k, where k is the first period with cumulative ≥ initial_investment. Discounted: same with CF_t / (1 + r)^t. Constant flow: payback = initial_investment / annual_cash_flow.`

Cash flows arrive at the end of each period but the fractional part assumes they accrue evenly within the recovery period. Payback ignores cash flows after recovery and (in the simple form) the time value of money.

## Data Sources

- Investopedia – Payback Period: Definition, Formula and How to Calculate — https://www.investopedia.com/terms/p/paybackperiod.asp (reference, retrieved 2026-09-24)
- Investopedia – Discounted Payback Period — https://www.investopedia.com/terms/d/discounted-payback-period.asp (reference, retrieved 2026-09-24)
- Wikipedia – Payback period — https://en.wikipedia.org/wiki/Payback_period (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/payback-period?initial_investment=…`
- `POST https://tttkmbb.com/api/v1/calculate/payback-period` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/payback-period · OpenAPI operationId `calculate_payback_period` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "payback-period", "inputs": {…}}`

## Example

- 10,000 then 3,000, 4,000, 5,000, 2,000 at 8 %: inputs `{"initial_investment":10000,"cash_flows":[3000,4000,5000,2000],"discount_rate_percent":8}` → `{"payback_period_years":2.6,"payback_time":"2 years 7 months","discounted_payback_period_years":2.96,"payback_reached":true,"cumulative_cash_flows":[3000,7000,12000,14000],"total_cash_flows":14000}`
- 50,000 with 12,000 per year for 10 years at 10 %: inputs `{"initial_investment":50000,"annual_cash_flow":12000,"years":10,"discount_rate_percent":10}` → `{"payback_period_years":4.17,"discounted_payback_period_years":5.67,"payback_reached":true}`

```
GET https://tttkmbb.com/api/v1/calculate/payback-period?initial_investment=10000&cash_flows=3000%2C4000%2C5000%2C2000&discount_rate_percent=8
```

## Limitations

You need the value created over the whole life (use npv) or the rate of return (use irr); payback ignores cash flows after recovery. Cash flows arrive at the end of each period but the fractional part assumes they accrue evenly within the recovery period. Payback ignores cash flows after recovery and (in the simple form) the time value of money. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Why is the discounted payback longer?**

Discounting shrinks later cash flows, so it takes more of them to add up to the investment: 2.96 instead of 2.6 years in the example at 8 %.

**What if the investment is never recovered?**

payback_reached is false and the payback outputs are omitted; the cumulative list shows how far the cash flows get.

## Related

- [NPV Calculator](https://tttkmbb.com/finance/npv.md) — Value of all cash flows, including those after payback.
- [IRR Calculator](https://tttkmbb.com/finance/irr.md) — Rate of return of the same cash flows.
- [Break-Even Calculator](https://tttkmbb.com/finance/break-even.md) — Units needed to cover fixed costs.
