ROI explained: formula, worked example and common mistakes
The total return on a holding, the yearly rate behind it and what one unit in became, with income and costs counted. Free, no sign-up.
Updated
What the ROI calculator works out
Return on investment is the fraction of what you put in that came back as gain, and this page works it out properly: the total return, the gain behind it in money, the multiple on the money in, the annualized rate that makes different holding periods comparable, and the years a rate like that takes to double money. Income taken out and costs paid along the way are counted in.
You type the amount invested, what it is worth now, how long you held it, and any income taken out or costs paid.
The formula
gain = value now - amount in + income - costs
total return = gain / amount in x 100
multiple = value now / amount in
annualized = multiple^(1/years) - 1
years to double = ln(2) / ln(1 + annualized)
Here value now is what the holding is worth today, amount in is what was paid for it, income is money taken out while holding and costs is money paid while holding. The annualized line is the yearly rate that compounds to the same multiple over the same years, and it is only exact when nothing was added or taken out part way.
A worked example
The default run is a plain holding:
Amount in = 10,000
Value now = 15,000
Years held = 5
Income, costs = 0
Gain = 15,000 - 10,000 = 5,000
Total return = 5,000 / 10,000 x 100 = 50.00%
Multiple = 15,000 / 10,000 = 1.500
Annualized = 1.500^(1/5) - 1 = 8.45% a year
Years to double = 8.5 at that speed
So 10,000 that became 15,000 over 5 years is a gain of 5,000: a 50 per cent return, which is 8.45 per cent a year compounded. At that speed, money doubles in 8.5 years.
What changes the answer
The value now and the amount in set the gain between them, and the return is their ratio, so a small move in either end of a short holding swings the percentage hard. The years do not touch the total return at all but pull the annualized figure strongly: the same gain over more years is a slower rate. Income adds to the gain without touching the amount in, so it lifts the return directly, and costs do the opposite.
When to use it, and when not to
Use it for a holding with one way in, one valuation and a known holding period: a position bought outright, a property let and sold, a stake held for years. The annualized line lets you compare it fairly against anything else with a time attached.
It takes no flows after the start, so regular monthly buying does not fit, and neither does money withdrawn part way; both need the irregular-return page. It holds no return assumptions either: no long-run averages, no asset class expectations. The rate you got is the one you type, and the page has no view on what any market does next.
Common mistakes people make
1. Quoting the total return without the years. A return of 50 per cent sounds large until the 5 years behind it appear. The annualized line exists so the timescale travels with the number.
2. Forgetting income taken out. Money drawn while holding is part of the return, and leaving it out understates the gain. In a long holding the income can outweigh the price move itself.
3. Treating the annualized rate as next year’s rate. It is the average speed that would have produced this result, worked backwards from the endpoint. It says nothing about any single year, and the route there may have been anything but smooth.
4. Comparing a total return with an annualized one. The two numbers describe different things, and a comparison between them is not a comparison at all. Put both through the same page and read the annualized line.
5. Counting some costs but not others. Everything paid on the way in, on the way out and along the way belongs in the costs box. Charges quietly omitted flatter the return by exactly their size.
6. Reading a doubling time as a promise. The 8.5 years to double is arithmetic on the rate just earned, and a rate just earned is no kind of forecast of the next one.
Frequently asked questions
What is the ROI formula?
Take what the holding is worth now, take away what was put in, add any income taken out along the way and take away any costs paid, then divide by what was put in. In the default run that is a gain of 5,000 on 10,000, a return of 50.00 per cent.
Why does the annualized figure matter?
Because a total return means nothing without its timescale. The same total over a handful of years and over a handful of months are very different speeds, and the annualized rate, 8.45 per cent in the default run, is what makes holdings of different lengths comparable.
How is the annualized return worked out?
It is the yearly rate that compounds up to the same multiple over the same years. The default run turns 10,000 into 15,000, a multiple of 1.500, and the fifth root of that multiple, less one, is the 8.45 per cent a year.
What counts as income and what as costs?
Income is money that came out of the holding while you held it, such as dividends, coupons or rent. Costs are what you paid to get in and out and to hold it. Income adds to the return and costs subtract from it.
What does the multiple tell me?
What one unit in became. The default run has a multiple of 1.500, meaning the value now is one and a half times the amount in. It is the cleanest way to see the size of a move before it is turned into a percentage.
Is the answer adjusted for prices rising?
No. It is a nominal return, measured in the money of the day. To see what it kept after general price rises, take the rate to the real return page, which strips an inflation figure back out of it.
What if I added money part way through?
The page takes one amount in and one value out, so money added or withdrawn part way through does not fit. Flows in and out at irregular dates need the irregular-return page, which times each flow individually.
This tool shows math, not advice.
Cite this page
Copy this line into a reference list, a report or a spreadsheet note.
Investment Math Calculator. “ROI Calculator”. Updated 2026-10-31. https://investmentmathcalculator.com/guides/roi-calculator/
Disclaimer: For education only. These calculators show arithmetic and hypothetical scenarios. They are not investment, tax or legal advice and do not recommend any security or product. Consult a licensed adviser in your country before acting.