HomeFinance › ROI Calculator

ROI Calculator

Computes the net gain and percentage return on investment from the amount invested and its final value, and the annualized (compound) return when the holding period in years is given.

When to use

You want the total percentage return of an investment, project or marketing spend, optionally converted to a per-year rate for comparison across holding periods.

Do not use when: There were multiple cash flows at different dates (that needs IRR/NPV), or you only need the growth rate between two values (use cagr).

Formula

ROI = (final_value − initial_investment) / initial_investment × 100; annualized ROI = ((final_value / initial_investment)^(1 / years) − 1) × 100

Simple holding-period return. The annualized figure is the equivalent constant compound rate (same as CAGR) and is only meaningful for periods of a year or more.

Inputs

ParameterTypeUnitRequiredDescription
initial_investmentnumberyesTotal cost of the investment including fees. Range: > 0, ≤ 1000000000000
final_valuenumberyesValue at the end (sale proceeds plus any income received). Range: ≥ 0, ≤ 1000000000000
yearsnumberyearsnoOptional length of the investment in years; enables the annualized return. Range: > 0, ≤ 200

Outputs

OutputTypeUnitDescription
net_gainnumberfinal_value − initial_investment (negative for a loss).
roi_percentnumber%net_gain / initial_investment × 100.
return_multiplenumberfinal_value / initial_investment (2 = money doubled).
annualized_roi_percentnumber%((final_value / initial_investment)^(1/years) − 1) × 100; only when years is given.

Example

10,000 grows to 15,000 in 3 years: {"initial_investment":10000,"final_value":15000,"years":3}{"net_gain":5000,"roi_percent":50,"return_multiple":1.5,"annualized_roi_percent":14.47}

2,000 falls to 1,500: {"initial_investment":2000,"final_value":1500}{"net_gain":-500,"roi_percent":-25,"return_multiple":0.75}

GET https://tttkmbb.com/api/v1/calculate/roi?initial_investment=10000&final_value=15000&years=3

Machine access

Sources

FAQ

Why is the annualized ROI less than ROI divided by years?

Because returns compound: 50 % over 3 years equals 14.47 % per year compounded, not 16.67 %, since 1.1447³ = 1.5.

Should dividends or rent be included?

Yes, add all income received to final_value and all costs (fees, taxes, repairs) to initial_investment to get a total return.

Related calculators