What is ROI and how do you calculate it?
Return on investment compares what an investment gave back with what it cost. The formula this calculator uses is ROI = (money back - money in) / money in, where money in is the purchase price plus the costs of buying and selling, and money back is the final value or sale proceeds plus any income received along the way.
With the default inputs: $10,000 invested plus $200 of costs is $10,200 in. The investment is now worth $13,500 and paid $600 of income, so $14,100 comes back. The net gain is $3,900 and the total ROI is 3,900 / 10,200 = 38.24%. Held for four years, that is an annualized ROI of 8.43% a year.
ROI is a ratio, so it has no currency of its own. The same 38.24% applies whether the figures are in dollars, pounds or dirhams, and the calculator never converts between them.
Why do total ROI and annualized ROI differ?
Total ROI says how much an investment returned over its whole life. It says nothing about how long that took. Annualized ROI spreads the same result over the years as a steady compound rate: annualized ROI = (1 + total ROI)^(1 / years) - 1. A 50% total return looks very different depending on the time it needed:
| Total ROI | Years held | Annualized ROI |
|---|---|---|
| 50% | 1 | 50.00% |
| 50% | 2 | 22.47% |
| 50% | 3 | 14.47% |
| 50% | 5 | 8.45% |
| 50% | 10 | 4.14% |
| 50% | 20 | 2.05% |
Dividing the total by the number of years gives a different and higher figure, because it ignores compounding. On the defaults, 38.24% over four years divided by four is 9.56% a year, while the compound rate that actually turns $10,200 into $14,100 in four years is 8.43%. The calculator shows both so you can see the gap, and the chart beside the result repeats the table above for your own total ROI.
How does the holding period change a comparison?
Two investments can only be ranked on total ROI if they were held for the same time. Switch on Compare with another investment to see why. With the defaults, this investment returned 38.24% over four years. The other returned 25% over two years: a smaller total, but 11.80% a year against 8.43% a year. Per year, the shorter investment grew faster.
The yearly rate is the fair comparison because it puts both results on the same clock. It still leaves two questions open. First, could the money from the shorter investment have been reinvested at the same rate for the remaining two years? Annualizing quietly assumes it could. Second, how much risk did each one carry along the way? Neither total nor annualized ROI measures that.
What counts as cost and income in an ROI calculation?
Leaving costs and income out can change the answer by several points. On the defaults, counting only the price change gives (13,500 - 10,000) / 10,000 = 35.00%. Adding the $600 of income and the $200 of costs moves the answer to 38.24%.
- Into costs: commissions and dealing charges on both the purchase and the sale, transaction or transfer taxes, platform or custody charges you paid separately, and for property the legal, survey and agent fees.
- Into income: dividends, interest and coupons received in cash, or rent after the running costs of the property.
- Neither: money you added later to the same holding. A second purchase changes the amount invested, so either add it to the purchase price or measure it separately.
Tax on the gain is left out because it depends on where you live and your own circumstances. To see an after-tax ROI, deduct the tax you paid from the final value. For gains on shares, the capital gains tax calculator works through the tax itself for several countries.
ROI for shares and rental property: examples in pounds and euros
| Example | Money in | Money back | Total ROI | Years | A year |
|---|---|---|---|---|---|
| US dollars, default | $10,000 + $200 costs | $13,500 + $600 income | 38.24% | 4 | 8.43% |
| Pounds, shares | £5,000 + £60 costs | £6,200 + £300 dividends | 28.46% | 3 | 8.71% |
| Euros, rental flat | €200,000 + €12,000 costs | €230,000 + €45,000 net rent | 29.72% | 5 | 5.34% |
In the pound example the net gain is £1,440 on £5,060 put in. In the euro example the flat rose only €30,000 in price, yet the €45,000 of net rent makes up most of the €63,000 gain, which is why ROI for rental property must include the rent. A property bought with a mortgage needs a different measure, return on the cash you put in, because the borrowed part is not your money; enter only your deposit and costs as money in, and the sale proceeds after repaying the loan as the final value.
How do you calculate ROI in Excel over multiple years?
Put the amount invested in B1, costs in B2, income in B3 and the final value in B4. Total ROI is =(B4+B3-B1-B2)/(B1+B2). With the defaults it returns 0.3824, or 38.24% formatted as a percentage.
For the yearly rate, Excel's RRI function does the annualizing in one step. Microsoft describes it as returning an equivalent interest rate for the growth of an investment, with the syntax RRI(nper, pv, fv). So =RRI(4, B1+B2, B4+B3), or =RRI(4, 10200, 14100), returns 8.43%. The longhand form =(1+ROI)^(1/4)-1 gives the same answer.
With dates instead of years, Excel's YEARFRAC function turns two dates into a fraction of years; its basis 1 counts actual days. This page counts whole years by anniversaries of the start date and then the part year by actual days, so its year count can differ slightly from YEARFRAC in the later decimal places. For the default dates of 1 June 2021 to 1 December 2025, the page counts 4.5014 years and an annualized ROI of 7.46%.
Annualized ROI, CAGR or IRR: which one fits?
Annualized ROI is the compound annual growth rate from money in to money back. It treats the income as if it all arrived on the last day, which keeps the arithmetic simple and slightly understates the return when income arrived earlier, because money received sooner could have been put to use.
When the timing of cash matters, such as a rental with yearly rent and a large repair in year three, the internal rate of return is the better tool. It weighs every cash flow by when it happened; the IRR calculator works from a list of yearly flows. For a value with no income in between, such as a fund's price at two dates, the CAGR calculator gives the same yearly rate as this page and shows the steady path between the two values.
ROI is also used outside investing, for example for a marketing campaign or a piece of equipment. The formula is the same, but costs and returns can be harder to pin down, and the holding period still matters when two projects are compared.
What about losses and holding periods under a year?
Losses work the same way. Put in $10,000 plus $100 of costs, sell three years later for $7,000 with no income, and the total ROI is -30.69%, or -11.50% a year. If everything is lost, total ROI is -100% and the annualized figure is -100% too, whatever the period.
Short holding periods need care in the other direction. Annualizing assumes the same return repeats for a full year, so 10% made in six months becomes 21.00% a year, and 5% made in three months becomes 21.55% a year. Those figures describe a pace, not something that happened, and the calculator adds a note whenever the period is under a year.
Dates are checked too. If the end date is not after the start date, the calculator still shows the total ROI and asks for valid dates before annualizing. A start date of 29 February has its anniversary on 28 February in other years, so 29 February 2020 to 29 February 2024 counts as exactly four years.
Common ROI mistakes and what this calculator leaves out
- Comparing total ROI across different periods. Annualize first, as the comparison panel does.
- Dividing by the years instead of compounding. 38.24% over four years is 8.43% a year, not 9.56%.
- Forgetting the selling costs. They are paid at the end but they belong in money in.
- Leaving out income. For dividend shares and rental property it can be most of the gain.
- Reading a past ROI as a guide to the next one. It records what happened over one period.
The calculator does not adjust for inflation, tax, the timing of income, money added part way through or the risk taken. To strip inflation out of an annualized ROI, use the real return calculator.
Glossary
Money in: purchase price plus buying and selling costs. Money back: final value or sale proceeds plus income received. Net gain: money back minus money in. Total ROI: net gain as a percentage of money in. Annualized ROI: the steady yearly compound rate that turns money in into money back over the holding period. Holding period: the time between purchase and sale or valuation. IRR: the yearly rate that accounts for when each cash flow happened.
Frequently asked questions
What is the formula for ROI?
ROI = (money back - money in) / money in, shown as a percentage. Money in is the purchase price plus buying and selling costs; money back is the final value plus any income received. For $10,200 in and $14,100 back, ROI is 38.24%.
How do I calculate annualized ROI?
Take the total ROI as a decimal, add 1, raise it to the power of 1 divided by the years held, and subtract 1. A 38.24% total over four years is 1.3824^(1/4) - 1 = 8.43% a year. In Excel, =RRI(years, money in, money back) gives the same figure.
What is the difference between ROI and annualized ROI?
Total ROI covers the whole holding period with no reference to time. Annualized ROI converts it into a steady yearly rate, so investments held for different lengths of time can be compared. A 50% total ROI is 22.47% a year over two years but only 4.14% a year over ten.
Is a 25% return over two years better than 38% over four?
Per year, yes: 25% over two years is 11.80% a year, while 38.24% over four years is 8.43% a year. In total, the four-year investment returned more. Which matters depends on what the money from the shorter one did for the other two years.
How do you calculate ROI on a rental property?
Add the purchase price and all buying and selling costs to get money in. Add the sale price or current value and the rent after running costs to get money back. A flat bought for 200,000 euros with 12,000 euros of costs, sold for 230,000 euros after 45,000 euros of net rent, has an ROI of 29.72%, or 5.34% a year over five years.
Should dividends be included in ROI?
Yes, if you want the full return. Leaving them out measures only the price change. On the default inputs, the price change alone is a 35.00% return, while including $600 of income and $200 of costs gives 38.24%.
How do I calculate ROI in Excel?
Enter the four amounts in cells B1 to B4 (amount invested, costs, income, final value). Total ROI is =(B4+B3-B1-B2)/(B1+B2). For the yearly rate over four years use =RRI(4, B1+B2, B4+B3), or =(1+ROI)^(1/4)-1.
Can ROI be negative?
Yes. Any time money back is less than money in, ROI is negative. Selling for $7,000 after putting in $10,100 is -30.69% in total, or -11.50% a year over three years. Losing everything is -100% over any period.
Why is my annualized ROI so high for a short holding period?
Annualizing assumes the same return repeats until a full year has passed. A 10% gain in six months becomes 21% a year and a 5% gain in three months becomes 21.55%. For periods under a year, the total ROI is usually the more honest figure.
Can I use this ROI calculator in pounds, euros or dirhams?
Yes. The selector offers 24 currencies and only changes how amounts are formatted; nothing is converted. ROI itself is a percentage, so the same inputs give the same ROI in any currency.
Courses for judging an investment before the return is in
Fundamental Analysis Online Crash Course
Introductory course on evaluating companies before investing, covering fundamental analysis, business performance, market value, and practical stock selection methods.
See what the course coversStock Market Trading Beginners Course
Structured online beginner program covering UK, USA, and European stock markets, technical analysis, fundamental analysis, risk management, and trading psychology.
See what the course coversAdvance Fundamental Analysis Online Course
In-depth fundamental analysis course covering basic concepts through advanced valuation techniques used by professional investors to select stocks for long-term decisions.
See what the course coversSources and review
Last reviewed 13 November 2026 by the NIFM Academy editorial team. Next review by 13 November 2027.
- Microsoft Support: RRI function, RRI(nper, pv, fv) returns an equivalent interest rate for the growth of an investment; nper is the number of periods, pv the starting value, fv the ending value. Checked 13 November 2026.
- Microsoft Support: YEARFRAC function, YEARFRAC(start_date, end_date, [basis]); basis 1 is actual/actual, 3 is actual/365, 0 or omitted is US (NASD) 30/360. Checked 13 November 2026.
- Return on investment and annualized return, ROI = (money back - money in) / money in; annualized = (1 + ROI)^(1/years) - 1, shown with your numbers in the working under every result. Checked 13 November 2026.