Home › Finance › Payback Period Calculator
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.
When to use
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.
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.
Inputs
| Parameter | Type | Unit | Required | Description |
|---|---|---|---|---|
initial_investment | number | yes | Outlay at time 0, entered as a positive number. Range: > 0, ≤ 1000000000000000 | |
cash_flows | number_list | no | Net cash inflow at the end of each period; takes precedence over annual_cash_flow. | |
annual_cash_flow | number | no | Used with `years` when cash_flows is omitted. Range: > 0, ≤ 1000000000000000 | |
years | integer | years | default 20 | Length of the constant cash-flow series (ignored when cash_flows is given). Range: ≥ 1, ≤ 60 |
discount_rate_percent | number | % per period | default 0 | Rate for the discounted payback; 0 skips it. Range: ≥ 0, ≤ 100 |
Outputs
| Output | 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. |
Example
10,000 then 3,000, 4,000, 5,000, 2,000 at 8 %: {"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 %: {"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
Machine access
- API:
GET https://tttkmbb.com/api/v1/calculate/payback-period(query parameters) orPOSTwith a JSON body{"inputs": {...}} - Schema: https://tttkmbb.com/api/v1/calculators/payback-period · Markdown: https://tttkmbb.com/finance/payback-period.md · JSON definition: https://tttkmbb.com/finance/payback-period.json
- MCP: server
https://tttkmbb.com/mcp, toolrun_calculator with calculator_id="payback-period" - OpenAPI operationId:
calculate_payback_period - Freshness:
static. Authentication: none. Rate limit: fair use (see rate limits).
Sources
- Investopedia – Payback Period: Definition, Formula and How to Calculate (reference)
- Investopedia – Discounted Payback Period (reference)
- Wikipedia – Payback period (reference)
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 calculators
- NPV Calculator — Value of all cash flows, including those after payback.
- IRR Calculator — Rate of return of the same cash flows.
- Break-Even Calculator — Units needed to cover fixed costs.