How to calculate return on investment (ROI), step by step
The ROI formula fits on an index card — the mistakes I see are never in the division, but in what people leave out of the two numbers before they divide. I work the formula in five steps, then the four traps that quietly wreck the answer.
Learning how to calculate return on investment sounds like it should need one formula, and it does — the formula fits on an index card. The mistakes I see are never in the division; they are in what people leave out of the two numbers before they divide. A forgotten dividend here, closing costs ignored there, and two investments that look identical turn out to be nothing alike. So I will work three examples end to end — a stock, a rental property’s down payment, and a small-business purchase — showing every input, including the ones that are easy to forget, and then annualise each one, because an ROI without a time span is only half an answer.
- ROI answers ‘how much?’ — it is silent on ‘how long?’, ‘how risky?’ and ‘compared with what?’, the three questions that decide whether a return was actually good.
- A forgotten dividend here, closing costs ignored there: ROI goes wrong in the ingredients, never in the division.
- I always annualise ROI before comparing two investments that ran for different lengths of time.
The formula, in five steps
ROI = (final value − total cost) ÷ total cost × 100, expressed as a percentage. Worked properly, it goes like this:
- Total your real cost. Not just the sticker price — include commissions, closing costs, transfer taxes and anything you spent to get in.
- Total your final value. The sale price (or current value) plus every dollar the investment paid you along the way: dividends, interest, net rent, distributions.
- Subtract to get the gain: final value − total cost.
- Divide the gain by the total cost and multiply by 100. That is your ROI.
- Write down the years. A 40% ROI over two years and over twenty years are different investments wearing the same number. Step five — annualising — is covered right after the first example.
Example 1: a stock, with its dividends counted
I buy 100 shares at $48: $4,800, and assume no commission. Over three years the stock pays me $420 in dividends. I then sell at $61 a share: $6,100. Final value is $6,100 + $420 = $6,520. Gain: $6,520 − $4,800 = $1,720. ROI = 1,720 ÷ 4,800 = 35.83%. Now watch the classic error: forget the dividends and the same investment “returns” ($6,100 − $4,800) ÷ $4,800 = 27.08%. Nothing changed except the bookkeeping — and the answer moved by almost nine points. Dividends are part of the return. Always.
The missing ingredient: time (annualising ROI)
ROI says how much; it is silent on how long. The fix is the annualised return, also called CAGR: (final value ÷ total cost)1/years − 1. For the stock: ($6,520 ÷ $4,800)1/3 − 1 = 10.75% a year. The same 35.83% ROI stretched over ten years instead of three would annualise to just 3.11% a year. Whenever you compare two ROIs, annualise both first — it is the only fair comparison, and it is the rate you can then feed into the investment calculator to project what happens if the performance repeats.
Example 2: a rental property — ROI on the down payment
Property investors usually measure ROI against the cash they actually committed, which means leverage enters the picture. Here are the full assumptions, nothing hidden:
| Input | Figure |
|---|---|
| Purchase price | $300,000 |
| Down payment (20%) + closing costs | $60,000 + $6,000 = $66,000 cash in |
| Mortgage: $240,000 at 6.5%, 30 years | Payment $1,516.96 a month |
| Balance remaining after 5 years | $224,666.35 |
| Property value after 5 years (2.8% a year growth) | $344,418.78 |
| Equity after 5 years (value − balance) | $119,752.44 |
| Net rent kept over 5 years (+$150 a month after the mortgage, taxes, insurance and maintenance) | $9,000 |
Rental example assumptions, stated in full. Figures before income tax; selling costs handled separately below.
Total value back: $119,752.44 of equity + $9,000 of net rent = $128,752.44. Gain: $128,752.44 − $66,000 = $62,752.44. ROI = $62,752.44 ÷ $66,000 = 95.1% over five years, which annualises to 14.30% a year. Now the honesty pass. Sell the property and a typical 6% in selling costs takes $20,665.13 off the top: value back falls to $108,087.31, ROI to 63.8%, annualised 10.37% — before income tax. And notice the leverage: that headline 95.1% is a return on $66,000 of cash, not on the $300,000 asset; measured against the full price plus closing costs, the same gain is a 20.5% return. Leverage magnifies ROI on cash in both directions — a falling market would have multiplied the loss the same way.
Example 3: a small-business purchase, and when ROI needs a partner
A business spends $25,000 on equipment. The machine adds $9,000 a year of profit for four years, then is sold for $8,000. Total value back: (4 × $9,000) + $8,000 = $44,000. Gain: $19,000. ROI = $19,000 ÷ $25,000 = 76%. But here ROI has a blind spot: the money arrived along the way, not in one lump at the end, and a dollar in year one is worth more than a dollar in year four. Spreading the gain evenly — the naive annualised figure — gives 15.18% a year, which understates it. The measure built for uneven cash flows is the internal rate of return (IRR): the single rate that makes the inflows, correctly timed, equal the $25,000 outlay. For this machine the IRR is about 24%. Rule of thumb: the more the cash arrives in instalments rather than at the end, the more IRR tells you that plain ROI cannot.
The four ROI traps
- Leaving costs out. Fees and closing costs are part of the cost. Omitting them flatters every ROI you compute.
- Forgetting the cash it paid you. Dividends, interest and rent are return. The stock example moved nine points on this alone.
- Comparing ROIs across different time spans. Annualise first, compare second — 35.83% is 10.75% a year over three years and 3.11% over ten.
- Ignoring leverage and risk. A 95.1% ROI on a down payment is a leveraged figure; the same deal unleveraged returns far less, and a price fall would have cut the other way just as hard.
And yes, ROI can be negative: put $2,000 in and take $1,700 out and the formula gives ($1,700 − $2,000) ÷ $2,000 = −15%. The formula does not judge; it reports.
Turn a return rate into a projection
Once you have an annualised return, enter it with a starting balance and monthly deposits to see where that performance leads over 10, 20 and 30 years.
Open the Investment CalculatorFrequently asked questions
What is the formula for return on investment?
ROI = (final value − total cost) ÷ total cost, multiplied by 100 to express it as a percentage. Final value means everything the investment returned — sale price plus dividends, rent or other cash it paid you. Total cost means everything you put in, including fees and closing costs, not just the headline purchase price.
How do I calculate return on investment on a rental property?
Measure it against the cash you actually committed, not the property price. Add your down payment and closing costs for the cost side; on the value side, take the property’s value minus the remaining mortgage balance (your equity) and add the net rent you collected. On this article’s example — $66,000 of cash in, $119,752.44 of equity and $9,000 of net rent after five years — ROI is 95.1%, or 14.30% annualised, before income tax and selling costs.
What is the difference between ROI and annualised return?
ROI is the total percentage gain over the whole holding period, however long that was. Annualised return (CAGR) spreads the same gain evenly across the years: (final value ÷ cost) raised to the power of 1 ÷ years, minus 1. A 35.83% ROI is excellent over three years — 10.75% a year — and mediocre over ten, where it works out to about 3.11% a year.
Can ROI be negative, and what counts as a good ROI?
Yes — if the final value is below your total cost, ROI is negative: $2,000 in and $1,700 back is a −15% ROI. ‘Good’ has no universal number; it depends on the time taken and the risk carried. A useful yardstick is the opportunity cost — US stocks have averaged about 10% a year over the long run, so an investment that returns much less than that over many years, with more risk, deserves a hard second look.
Method: all figures computed for this article from the ROI and compound annual growth rate formulas; the mortgage payment and remaining balance from the standard amortisation formula; the IRR found by solving the cash-flow equation for the equipment example. Examples are simplified illustrations with assumptions stated in full — not investment advice.
- 1What $10,000 in the S&P 500 became: 10, 20 and 30-year worked examples
Some version of the same question arrives every day: if I had put $10,000 into the S&P 500 and simply left it…
- 2The rule of 72: how long until your money doubles
Here is the most useful piece of mental arithmetic I own: divide 72 by any annual return and the answer is…
- 3Roth IRA vs brokerage account: same deposit, different ending balance
Same deposit, same investments, same return — two different ending balances. I run one identical scenario…
- 4SWP Calculator
Monthly withdrawal plan.
- 5Retirement Calculator
Plan your nest egg.
- 6Compound Interest Calculator
Growth on growth.
