How to Calculate ROI (Return on Investment): Formula & Examples
Learn the ROI formula, work through real examples with step-by-step math, calculate annualized ROI, and avoid the mistakes that make returns look better than they are.
Introduction
Return on investment is measured with one formula: ROI = (Net Profit ÷ Cost of Investment) × 100, where net profit is the final value minus everything you put in. Expressed as a percentage, it tells you how much you gained or lost relative to what the investment cost you. This guide breaks down the formula, works through concrete examples with the full arithmetic shown, explains how to annualize returns so you can compare investments fairly, and flags the mistakes that quietly inflate the numbers.
If you would rather plug in your own figures than do the math by hand, the ROI Calculator returns your percentage instantly.
What Is ROI?
Return on investment (ROI) is a profitability ratio that compares the gain or loss from an investment to its cost. It answers a simple question: for every dollar I put in, how much did I get back?
Because ROI is expressed as a percentage rather than a raw dollar figure, it lets you compare investments of very different sizes on equal footing. A $500 profit sounds better than a $200 profit until you learn the first came from a $50,000 investment (1% ROI) and the second from a $1,000 investment (20% ROI). The percentage strips away the scale and shows you efficiency.
ROI is used everywhere: evaluating stock trades, real estate deals, marketing campaigns, business equipment purchases, education, and side projects. Its universality is exactly why it is so popular — and why it is so often misapplied.
The ROI Formula
The standard formula is:
ROI = (Net Profit / Cost of Investment) × 100
Net profit is simply what you ended up with minus what you spent:
Net Profit = Final Value − Cost of Investment
Combining the two, you can also write ROI in a single step:
ROI = ((Final Value − Cost of Investment) / Cost of Investment) × 100
Breaking Down Each Part
Cost of Investment — Everything you put in, not just the sticker price. This includes fees, commissions, closing costs, repairs, and any other money you spent to acquire and hold the investment. Understating this number is the single most common way people inflate their ROI.
Final Value — What the investment is worth when you measure it, or what you sold it for. For income-producing assets, this should include any cash the investment paid you along the way (dividends, rent, interest).
× 100 — Converts the decimal ratio into a percentage. A ratio of 0.25 becomes 25%.
A positive result is a gain; a negative result is a loss. An ROI of 0% means you exactly broke even.
Worked Example 1: A Simple Stock Trade
Scenario: You buy 100 shares of a company at $40 per share and sell them two years later at $52 per share. You paid a $10 commission when buying and another $10 when selling. The stock paid no dividends. What is your ROI?
Step 1: Calculate the Total Cost of Investment
Shares: 100 × $40 = $4,000
Buy fee: $10
Sell fee: $10
Cost of Investment = $4,020
Step 2: Calculate the Final Value
Final Value = 100 × $52 = $5,200
Step 3: Calculate Net Profit
Net Profit = $5,200 − $4,020 = $1,180
Step 4: Apply the ROI Formula
ROI = ($1,180 / $4,020) × 100 = 29.35%
Result: Your ROI is about 29.35%. Notice that if you had ignored the $20 in fees, you would have calculated net profit as $1,200 on a $4,000 cost, giving 30% — slightly overstated. Small fees distort the percentage more than people expect.
Worked Example 2: A Marketing Campaign
ROI is not just for investments you buy and sell. Businesses use it to judge whether spending pays off.
Scenario: A company spends $8,000 on an advertising campaign. The campaign directly generates $30,000 in new sales, but those sales carry $18,000 in product and fulfillment costs. What is the ROI of the campaign?
Step 1: Identify the True Cost
The cost of the “investment” here is the ad spend plus the cost of the goods sold to fulfill the resulting orders:
Ad spend: $8,000
Cost of goods sold: $18,000
Total Cost = $26,000
Step 2: Identify the Final Value
Final Value = Revenue generated = $30,000
Step 3: Calculate Net Profit
Net Profit = $30,000 − $26,000 = $4,000
Step 4: Apply the Formula
ROI = ($4,000 / $26,000) × 100 = 15.38%
Result: The campaign returned about 15.38%. Marketers sometimes quote a simpler “return on ad spend” that only compares revenue to ad cost ($30,000 ÷ $8,000 = 3.75x). That number looks impressive but ignores the cost of actually delivering the product. Always be clear about which costs are included before celebrating a figure.
Why Time Matters: Annualized ROI
Basic ROI has a serious blind spot: it ignores how long you held the investment. A 40% return is spectacular in one year and mediocre over ten. To compare investments held for different periods, you need annualized ROI, which expresses the return as an equivalent yearly rate.
The formula is:
Annualized ROI = ((1 + ROI)^(1 / n) − 1) × 100
Here ROI is written as a decimal (40% = 0.40) and n is the number of years the investment was held. This compounding-based formula is more accurate than simply dividing total ROI by the number of years, because it accounts for growth building on itself.
Worked Example 3: Comparing Two Investments
Suppose you are choosing between two completed investments:
- Investment X: returned 50% total over 5 years
- Investment Y: returned 22% total over 2 years
At a glance, X looks better because 50% is larger than 22%. But annualizing tells a different story.
Investment X:
Annualized ROI = ((1 + 0.50)^(1/5) − 1) × 100
= (1.50^0.2 − 1) × 100
= (1.0845 − 1) × 100
= 8.45% per year
Investment Y:
Annualized ROI = ((1 + 0.22)^(1/2) − 1) × 100
= (1.22^0.5 − 1) × 100
= (1.1045 − 1) × 100
= 10.45% per year
Result: Investment Y is actually the stronger performer, earning about 10.45% per year versus 8.45% for Investment X, even though its total return was less than half as large. This is exactly the kind of comparison basic ROI gets wrong, and it is why professionals almost always annualize.
Total ROI vs. Annualized ROI at a Glance
| Investment | Total ROI | Years Held | Annualized ROI |
|---|---|---|---|
| X | 50% | 5 | 8.45% |
| Y | 22% | 2 | 10.45% |
| Z | 15% | 1 | 15.00% |
For an investment held exactly one year, total and annualized ROI are identical, as Investment Z shows.
Simple ROI vs. Other Return Metrics
ROI is popular because it is easy, but it is not the only tool, and sometimes not the right one. Here is how it compares to related metrics.
| Metric | What It Measures | Accounts for Time? | Best For |
|---|---|---|---|
| ROI | Total gain vs. cost | No | Quick, single-period comparisons |
| Annualized ROI | Equivalent yearly rate | Yes (holding period) | Comparing different durations |
| CAGR | Compound annual growth rate | Yes | Multi-year investment growth |
| NPV | Present value of future cash flows | Yes (discounting) | Long-term projects, capital budgeting |
| IRR | Discount rate that zeroes NPV | Yes | Uneven cash flows over time |
For most everyday decisions — did this trade, purchase, or campaign pay off — basic ROI or annualized ROI is enough. For large, multi-year projects with cash flowing in and out at different times, NPV and IRR give a more honest answer because they account for the time value of money, which ROI ignores entirely.
Note that annualized ROI on a single lump-sum investment is mathematically the same as CAGR (compound annual growth rate). The two terms describe the same calculation from slightly different angles.
Common Mistakes to Avoid
ROI is simple to compute, which is precisely why it is so easy to get wrong. Watch for these traps:
- Understating the cost of investment. Leaving out fees, commissions, closing costs, maintenance, or your own time makes the denominator too small and the ROI too flattering. Count every dollar that went in.
- Ignoring the holding period. A raw ROI with no time frame is nearly meaningless for comparison. Always annualize when comparing investments held for different lengths of time.
- Forgetting income along the way. For dividend stocks, rental property, or interest-bearing assets, the cash the investment paid you is part of the return. Add it to the final value.
- Mixing gross and net figures. Comparing one investment’s gross ROI (before taxes and fees) to another’s net ROI is apples to oranges. Pick one basis and apply it consistently.
- Ignoring inflation. A 5% return in a year with 4% inflation is only about 1% in real purchasing power. For long horizons, consider real (inflation-adjusted) ROI.
- Confusing ROI with profit. A high ROI on a tiny investment can produce trivial dollar gains, while a modest ROI on a large investment can be life-changing. Look at both the percentage and the absolute amount.
- Assuming past ROI predicts future ROI. A calculated ROI is a historical measurement, not a forecast. Real-world returns vary, and future results are never guaranteed.
A Quick Note on Real vs. Nominal ROI
The ROI you calculate from raw dollars is a nominal figure. To find your real ROI — what you actually gained in purchasing power — subtract the inflation rate over the same period. Inflation figures change every year, so check the current official rate from your national statistics agency rather than relying on a fixed number.
As a rough approximation:
Real ROI ≈ Nominal ROI − Inflation Rate
For example, a nominal annualized ROI of 8% during a period of 3% inflation works out to roughly 5% real return. For precise work the exact formula is ((1 + nominal) ÷ (1 + inflation) − 1), but the subtraction shortcut is close enough for most decisions.
Putting It All Together
The ROI formula — (Net Profit ÷ Cost of Investment) × 100 — is one of the most useful tools in personal and business finance because it turns any gain or loss into a comparable percentage. But its simplicity is a double-edged sword. Used carelessly, it can make a slow investment look fast, a costly campaign look cheap, or a risky bet look safe.
To use ROI well, remember three things: count every cost, always note the time frame, and annualize before comparing. Do that, and this humble little percentage becomes a genuinely reliable guide.
Related Guides and Calculators
- The ROI Calculator runs the full formula from this guide — including annualized ROI — for any cost, final value, and holding period.
- Because ROI ignores compounding within a single period, pairing it with How to Calculate Compound Interest shows how returns build on themselves over time.
- If you are evaluating a property or any financed purchase, How to Calculate a Mortgage Payment helps you pin down the true cost of investment that belongs in the ROI denominator.
Conclusion
Return on investment is calculated as (Net Profit ÷ Cost of Investment) × 100, and net profit is simply your final value minus everything you put in. That is the whole formula. The skill is not in the arithmetic — it is in defining “cost” and “final value” honestly and in respecting the role of time.
To recap:
- Basic ROI = (Net Profit ÷ Cost) × 100, expressed as a percentage
- Include every cost, and count income like dividends or rent in the final value
- Annualized ROI = ((1 + ROI)^(1/n) − 1) × 100 lets you compare different holding periods fairly
- ROI ignores the time value of money; use NPV or IRR for complex, long-term projects
- Adjust for inflation to see your real return
Ready to run your own numbers? Use the ROI Calculator to calculate both total and annualized ROI in seconds — no sign-up required.
Frequently Asked Questions
What is a good ROI percentage? +
It depends entirely on the investment type, the risk, and the time period. As a rough benchmark, the U.S. stock market has historically averaged around 7 to 10 percent per year before inflation over long periods, so a diversified portfolio returning in that range annually is considered solid. A higher one-time ROI on a risky venture is not necessarily better than a lower, steady annual return, which is why you should always compare returns on an annualized basis.
What is the difference between ROI and annualized ROI? +
Basic ROI measures total gain relative to cost over the entire holding period, ignoring how long you held the investment. Annualized ROI converts that total return into an equivalent yearly rate, which lets you compare investments held for different lengths of time. A 50 percent ROI earned over 5 years is far weaker than a 50 percent ROI earned in 1 year, and only the annualized figure makes that clear.
Can ROI be negative? +
Yes. If the final value of an investment is less than what you paid, your net return is negative and so is your ROI. For example, buying an asset for 10,000 dollars and selling it for 8,000 dollars produces a net loss of 2,000 dollars and an ROI of negative 20 percent. A negative ROI simply means you got back less than you put in.
Does ROI account for the time value of money? +
No. Basic ROI treats a dollar earned today the same as a dollar earned five years from now, which is its biggest weakness. For long-term projects where timing matters, metrics like net present value (NPV) and internal rate of return (IRR) are more accurate because they discount future cash flows. Annualizing your ROI is a simpler partial fix that at least accounts for the holding period.
Should I include fees and taxes when calculating ROI? +
For an honest picture, yes. Transaction fees, commissions, management costs, and taxes all reduce your actual return, so a net ROI that subtracts them reflects what you truly earned. Many advertised returns are gross figures that ignore these costs. Calculate ROI both ways if you like, but base real decisions on the net number.
Daniel Agrici
NovaCalculator Editorial Team
Our writers combine mathematical expertise with clear writing to make calculations accessible to everyone. Content is checked against authoritative sources including NIST, WHO, and CFPB.
Try the Calculator
ROI Calculator
Use the free tool to calculate instantly — no signup needed.