Skip to content

ROI Calculator

Your return as a total and per year, from two amounts or every dated deposit.

Your return on investment as a total and as a yearly rate, from what you put in and what it is worth now, or from every dated deposit and withdrawal (XIRR).

Your investment as

$
$
yrs

For a yearly rate. Months: divide by 12.

More optionsAdd dividends or interest received
$

Dividends, interest or rent you took as cash.

ExampleReturn on investment

65%

$6,500 gained on $10,000 over 5 years: 10.53% a year, compounded.

Enter your own amounts to see your return.

Same money, two yearly rates: the compound rate that really happened, and the simple average (ROI ÷ years), which overshoots.

StartYear 5
  • At the 10.53% CAGR$17k
  • At the 13% simple average$18k
Gain
$6,500
Yearly, compounded (CAGR)
10.53%
Simple average a year
13%

An estimate from the numbers you enter, before fees and taxes. Not financial advice. Past returns say nothing certain about future ones. Fees and taxes are not included unless they are in your amounts. SourcesTerms

How this works: 7 sources,

How this works

Method

ROI is (what you got back, income included, minus the cost) ÷ the cost, and the yearly rate is (1 + ROI)^(1 ÷ years) − 1, the compound annual growth rate. With dated cash flows it is the XIRR: the yearly rate at which every deposit and withdrawal, discounted from its own date in years of 365 days, sums to zero, solved by Newton’s method from 10% with a bisection fallback, as Microsoft Excel defines it.

How it’s tested

20 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Limits

An estimate from the numbers you enter, before fees and taxes. Not financial advice. Past returns say nothing certain about future ones. Fees and taxes are not included unless they are in your amounts.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • First published: ROI as a total and a yearly rate, dated cash flows with XIRR on a timeline, and CAGR, annualized return, XIRR, dividend and real return pages.

Every change on What’s new

How we make toolsReport a mistake

Key facts

  • ROI is (what you got back − what it cost) ÷ cost: $10,000 that became $16,500 is a 65% return; over 5 years that is 10.53% a year, compounded.
  • Dividing a total return by the years overstates the yearly rate: 100% over 5 years averages 20% a year, but the compound rate is 14.87%.
  • US stocks returned 8.6% a year on a simple average after inflation from 1871 to 2025, but 7.1% compounded, the rate money actually grew at.
  • XIRR, the yearly return on dated cash flows, gives 37.34% on Microsoft’s documented example and 18.28% on LibreOffice’s; this calculator matches both.

Sources: Robert J. Shiller, Online Data (to January 2026), our calculation; Microsoft Support and LibreOffice Help, XIRR

All 5 calculators

Return per year · Income and inflation

ROI, CAGR and XIRR: three answers to “how did it do?”

ROI, return on investment, compares the gain with what you paid: a single percentage for the whole holding, however long it lasted. It is the right number for one purchase and one sale, and for comparing things held for the same time.

CAGR, the compound annual growth rate, turns that into a steady yearly rate: the rate that, compounded each year, takes the starting value to the ending one. It is the fair way to compare investments held for different lengths of time, and it is what fund fact sheets mean by an annualized return.

XIRR handles the real case, where money goes in and out on many dates: a monthly saving plan, a top-up after a fall, a withdrawal for a holiday. It finds the one yearly rate at which all those dated cash flows balance, so every dollar is weighted by how long it was invested. With one deposit and one final value it is exactly the CAGR.

Why the simple average return overstates growth

Gains and losses do not cancel: a 50% gain followed by a 50% loss leaves you with 75% of what you started with, even though the two returns average 0%. The arithmetic average of yearly returns is always at least the compound rate, and the more the returns swing, the bigger the gap.

On real US stock returns since 1871, the simple average is 8.6% a year and the compound rate 7.1%. Plan with the compound rate: it is the one your money actually grew at. The chart on this page draws both from your own numbers.

The formulas

  • ROI = (value + income − cost) ÷ cost
  • Annualized = (1 + ROI)^(1 ÷ years) − 1
  • XIRR: Σ amountᵢ ÷ (1 + r)^((dateᵢ − date₁) ÷ 365) = 0

Sources

Common questions

How do I calculate ROI?

Subtract what the investment cost from what you got back (its value now, or what you sold it for, plus any income it paid), then divide by the cost. $5,000 that became $6,200 with $300 of dividends is (6,500 − 5,000) ÷ 5,000 = 30%.

What is a good ROI?

It depends on the time and the risk, which is why the yearly rate matters more than the total. A 50% return over 2 years is 22.47% a year; over 10 years it is 4.14%. For context, US stocks have compounded at about 7.1% a year after inflation since 1871.

What is the difference between ROI and annualized ROI?

ROI is the whole gain as a share of the cost, however long it took. Annualized ROI spreads it into the steady yearly rate that compounds to the same result: (1 + ROI)^(1 ÷ years) − 1.

What if I added or took out money along the way?

Switch to “Dated cash flows” and enter each one with its date. The calculator then works out the money-weighted return, the XIRR, which counts how long each dollar was invested.

Does ROI include fees and taxes?

Only if your numbers do. Use what you actually paid, fees included, and what you actually received; taxes on the gain are not taken off.