How to Calculate ROI (Return on Investment)
To calculate ROI, subtract what an investment cost from what it is now worth, divide that profit by the original cost, and multiply by 100 to get a percentage. It is the simplest way to measure how much you earned relative to what you put in. This guide covers the formula, a worked example, and how to annualize ROI so you can fairly compare investments held for different lengths of time.
ROI = (Net profit ÷ Cost of investment) × 100. If you put in $1,000 and it grew to $1,300, your net profit is $300, so your ROI is 300 ÷ 1,000 = 30%. The one thing basic ROI leaves out is time, so to compare investments held for different periods, you annualize it (explained below).
The ROI formula
Return on investment measures the gain or loss on an investment relative to its cost, expressed as a percentage. There are two equivalent ways to write it:
Both give the same answer. Net profit is simply the final value minus everything you paid. A positive ROI means a gain; a negative ROI means a loss. Because it is a percentage, ROI lets you compare very different investments on the same scale, which is exactly why it is so widely used.
How to calculate ROI step by step
- Add up your total cost. Include the purchase price plus any fees, commissions, or other costs of buying.
- Find the final value. Use what the investment sold for, or is currently worth, plus any income it paid you along the way, such as dividends or interest.
- Subtract to get net profit. Final value minus total cost.
- Divide and multiply. Divide the net profit by the total cost, then multiply by 100 for a percentage.
The two steps people skip are including fees in the cost and including income like dividends in the final value. Leaving either out makes your ROI look better or worse than it really was.
A worked example
Suppose you bought shares for $1,000, paid a $10 buying commission, collected $40 in dividends, and later sold the shares for $1,260 with a $10 selling commission.
| Total cost ($1,000 + $10 commission) | $1,010 |
| Final value ($1,260 sale + $40 dividends − $10 selling cost) | $1,290 |
| Net profit ($1,290 − $1,010) | $280 |
| ROI ($280 ÷ $1,010 × 100) | 27.7% |
So the investment returned about 27.7% in total. Notice how the fees and dividends changed the result: ignoring them would have given a misleadingly clean 26% ($260 on $1,000). Accurate ROI counts every dollar in and every dollar out.
Why basic ROI can be misleading: the time problem
Plain ROI has one big blind spot. It tells you the total return but says nothing about how long it took. A 30% return is excellent in one year and mediocre over ten. To compare investments held for different periods, you convert total ROI into an annualized rate, the steady yearly return that would compound to the same result.
This is the same idea as the compound annual growth rate (CAGR). For example, a total ROI of 30% earned over 3 years annualizes to about 9.1% per year, because 1.30 raised to the power of one-third is roughly 1.091. The same 30% earned in a single year is a 30% annual return. Same total, very different performance, which is why annualizing matters. Our guide to calculating compound interest walks through the compounding math behind this in more detail, and our compound interest calculator projects how a return compounds over the years.
Run the numbers on your goals
Use our free calculators to project growth, retirement targets, and after-tax returns.
What to include in an ROI calculation
An honest ROI captures the full picture:
- All costs, not just the headline price. Commissions, account fees, and transaction costs reduce your real return.
- Income, not just price change. Dividends, interest, and distributions are part of your total return. An investment whose price barely moved can still have a solid ROI from income.
- Taxes, when comparing after-tax results. Two investments with the same pre-tax ROI can differ once tax is applied, especially across account types. If you are selling investments, our capital gains tax calculator shows how much of a gain you keep after tax.
ROI vs other ways to measure return
ROI is the simplest measure, but a few relatives handle situations it cannot:
- Annualized ROI / CAGR adjusts for time, so it is the fairest way to compare investments held for different periods.
- Internal rate of return (IRR) handles cash flowing in and out at different times, such as ongoing contributions, which a single ROI figure cannot capture cleanly. Regular investing through dollar-cost averaging is a common case where IRR fits better.
- Real (inflation-adjusted) return subtracts inflation, showing how much your buying power actually grew rather than the nominal number.
For most quick comparisons, plain ROI plus annualizing it is enough. Reach for IRR or real return only when contributions over time or inflation are central to the decision.
ROI beyond the stock market
The same formula works far beyond stocks, which is part of why ROI is so popular. The trick is being consistent about what counts as cost and what counts as return in each case.
- Real estate. Cost includes the purchase price, closing costs, and any renovations; return includes rental income and the eventual sale price, minus selling costs and taxes. Because property is usually bought with a mortgage, investors often calculate ROI on the cash they actually put in, known as cash-on-cash return, rather than the full property value.
- A business or side project. Cost is what you invested to start and run it; return is the profit it generates. This is how owners decide whether the money and time were worth it.
- Marketing and advertising. Businesses measure ROI on ad spend by dividing the profit a campaign produced by its cost, which tells them whether to keep spending.
In every case the percentage is comparable, so ROI lets you line up a rental property, a stock portfolio, and a business idea on the same scale, as long as you annualize returns earned over different time spans before comparing them.
Common ROI mistakes to avoid
- Ignoring fees and taxes, which inflates the result above what you actually earned.
- Forgetting income such as dividends, which understates the result.
- Comparing different time periods using total ROI instead of annualized ROI.
- Confusing ROI with profit. A large dollar profit on a large investment can be a small ROI, and vice versa. Percentage and dollars answer different questions.
Frequently asked questions
ROI equals net profit divided by the cost of the investment, multiplied by 100. Net profit is the final value minus everything you paid, including fees. For example, a $300 profit on a $1,000 investment is a 30% ROI.
It depends on the time period and the risk. Over the long run, a broad stock market index has historically returned roughly 7% to 10% per year on average before inflation. A good ROI is one that beats a comparable lower-risk option after costs, but past returns do not guarantee future results.
Divide the final value by the initial cost, raise the result to the power of one divided by the number of years, then subtract 1. For instance, a 30% total return over 3 years annualizes to about 9.1% per year. This is the same as the compound annual growth rate (CAGR).
Yes. For an accurate ROI, add income like dividends and interest to the final value, and include buying and selling fees in the cost. Leaving them out makes the return look better or worse than it really was.
Profit is the dollar gain. ROI is that gain as a percentage of what you invested. A $1,000 profit could be a 100% ROI on a $1,000 investment or a 1% ROI on a $100,000 investment, so ROI tells you how efficiently your money worked, not just how much you made.
Last updated: June 2026 · ROI examples are illustrative; historical average returns do not guarantee future results.
This article is general information, not financial advice. Returns vary, and past performance does not guarantee future results. Fees, taxes, and inflation affect your real return. Consider speaking with a qualified financial professional before making investment decisions.
