How to Calculate ROI (Return on Investment)

The ROI formula, common mistakes that overstate returns, and how to annualize a return for fair comparison across time periods.

Written and reviewed by Arslan SarwarUpdated General information, not financial advice

Return on investment is one of the simplest formulas in finance, and one of the easiest to get wrong in practice, because getting it right depends on what you count as "invested" and what you count as "returned." This guide covers the formula, a complete worked example, how to compare investments held for different lengths of time, and the common mistakes that make an ROI look better or worse than it really is.

ROI Formula (Return on Investment Equation)

ROI = (Amount Returned − Amount Invested) / Amount Invested × 100%

You'll also see the same equation written as net profit divided by the cost of the investment:

ROI = Net Profit / Cost of Investment × 100%

Both give the same answer, because net profit is simply the amount returned minus the amount invested. If you put in $10,000 and end up with $12,000, that's a $2,000 gain on a $10,000 base: a 20% ROI. The formula itself is not the hard part.

How to Calculate ROI in Three Steps

  1. Add up the total amount invested: the purchase price plus every fee and cost to buy and hold the investment.
  2. Add up the total amount returned: what you received when you sold, after selling costs, plus any income paid along the way.
  3. Subtract, divide, and multiply by 100: (returned − invested) ÷ invested × 100 gives ROI as a percentage.

ROI is a ratio, so it works for anything with a cost and a payoff: a stock, a rental property, a business project, or a home improvement. That flexibility is also its weakness: the formula will accept whatever numbers you give it, so the answer is only as good as your inputs.

The Mistake: Ignoring Real Costs

The "amount invested" should include everything you spent to make and hold the investment, not just the sticker price. Brokerage fees, closing costs, maintenance, or any other cost tied to the investment are real money at risk, and leaving them out inflates your ROI. A $10,000 investment with $500 in fees has $10,500 truly invested; using $10,000 as the base overstates the return.

Costs at the exit count too. Selling commissions, transaction fees, and (for real estate) agent fees and closing costs reduce what you actually receive, so subtract them from the amount returned.

The Other Mistake: Ignoring Income Along the Way

Some investments pay you before you ever sell: dividends from stocks, rent from a property, interest from a bond. That income is part of your return and belongs in the numerator, not just the change in the asset's price. A property that gained little in value but paid steady rent might have a much better ROI than its price change alone suggests.

ROI Calculation Example, Step by Step

Suppose you buy $10,000 of a stock fund and pay $50 in transaction fees. Over 4 years it pays $250 a year in dividends, which you take as cash. You then sell for $12,400 and pay another $50 to sell.

ItemAmount
Purchase price$10,000
Fees to buy$50
Total invested$10,050
Sale proceeds after fees ($12,400 − $50)$12,350
Dividends received ($250 × 4)$1,000
Total returned$13,350
ROI = ($13,350 − $10,050) / $10,050 × 100% ≈ 32.8%

Looking only at the price change ($10,000 to $12,400) would suggest 24%. Counting fees lowers the result a little; counting dividends raises it a lot. The complete figure is 32.8% over 4 years.

ROI formula diagram: $13,350 returned minus $10,050 invested equals $3,300 net profit; $3,300 divided by $10,050 equals 32.8% ROIThe worked example step by step: net profit first, then divide by the total invested.

More ROI Calculation Examples

The same formula works well beyond stocks. Three quick examples:

A marketing campaign. A business spends $5,000 on an ad campaign that brings in sales producing $8,000 of gross profit (revenue minus the cost of the goods sold, not revenue alone, which would overstate the return).

ROI = ($8,000 − $5,000) / $5,000 × 100% = 60%

A home renovation. A $30,000 kitchen remodel raises the home's sale price by an estimated $21,000. Judged purely as an investment, the remodel loses money:

ROI = ($21,000 − $30,000) / $30,000 × 100% = −30%

A negative ROI means you got back less than you put in. That doesn't make the project a mistake (you also get years of using the kitchen) but it does mean the remodel didn't pay for itself.

Business equipment. A $12,000 machine saves $4,000 a year in labor for 5 years and is then sold for $1,000. Total returned is $4,000 × 5 + $1,000 = $21,000.

ROI = ($21,000 − $12,000) / $12,000 × 100% = 75%

Over 5 years, that's about 11.8% a year annualized: a figure you can compare against what the same $12,000 would have earned elsewhere.

Annualized ROI: Why Time Matters

A 20% ROI over six months and a 20% ROI over five years are very different outcomes, but the basic formula treats them identically. To compare fairly, convert to an annualized rate using the compounding formula, not simple division:

Annualized ROI = (Total Returned / Total Invested)^(1/years) − 1

Dividing by years instead of using this formula understates how good a short-term return actually is and overstates how good a long-term one is, because it ignores that returns compound rather than accumulate in a straight line.

With the numbers above: 20% over six months annualizes to 44% (1.2 ^ 2 − 1), not the 40% that simple division gives. 20% over five years annualizes to about 3.71% a year, not 4%. In the stock example, 32.8% over 4 years is about 7.36% a year.

Annualizing changes which investment looks better:

Investment AInvestment B
Total ROI50%30%
Holding period6 years3 years
Annualized ROI6.99%9.14%

Investment A has the larger total return, but B grew faster each year. If you could reinvest B's proceeds at a similar rate, B is the better performer. Annualized ROI is the same idea as compound annual growth rate, which the CAGR calculator computes directly.

How to Calculate ROI in Months

For an investment held less than a year (or any period you track in months) swap years for months in the exponent:

Annualized ROI = (Total Returned / Total Invested)^(12 / months) − 1
Monthly ROI    = (Total Returned / Total Invested)^(1 / months) − 1

An 8% ROI earned over 9 months works out to about 10.8% annualized (1.08 ^ (12 ÷ 9) − 1), or roughly 0.86% per month.

How to Calculate ROI in Excel or Google Sheets

Put the total amount invested in cell A1, the total amount returned in B1, and the holding period in years in C1. Then:

What you wantFormula
ROI=(B1-A1)/A1
Annualized ROI=(B1/A1)^(1/C1)-1
Net profit=B1-A1

Format the ROI cells as percentages. If your holding period is in months, use =(B1/A1)^(12/C1)-1 for the annualized figure.

When Simple ROI Isn't Enough

The basic formula assumes one amount goes in at the start and one amount comes out at the end. That breaks down in two common situations:

  • Ongoing contributions. If you add money every month to a retirement account, the dollars invested last month haven't had time to grow. Dividing the gain by total contributions and annualizing over the whole period treats every dollar as if it were invested on day one, which makes the investments look worse than they performed. Statements often report a time-weighted or money-weighted return for this reason.
  • Income received at different times. In the stock example, dividends arrived throughout the 4 years, but the annualized figure treats them as if they arrived at the end. For a rough comparison that's fine; for a precise one, an internal rate of return (IRR) calculation accounts for when each cash flow happened.

Common Misconceptions

"An average annual return tells me how much I made." Average returns can mislead when results swing. A $10,000 investment that gains 50% one year and loses 50% the next has an average annual return of 0%, but the balance is $7,500: a 25% loss. Annualized ROI uses the compounding formula and gets this right.

"A loss and a gain of the same size cancel out." After a loss, you need a larger percentage gain to get back to even:

LossGain needed to break even
10%11.1%
20%25%
30%42.9%
50%100%

Bar chart of the gain needed to recover from a loss: 11.1% after a 10% loss, 25% after 20%, 42.9% after 30%, and 100% after 50%The deeper the loss, the faster the required recovery grows.

"A positive ROI means I came out ahead." Not necessarily in purchasing power. A 40% ROI over 5 years is about 6.96% a year. With 3% annual inflation over the same period, prices rise about 15.9%, so the real return is about 20.8% in total, or roughly 3.85% a year. The inflation calculator helps convert past dollars into today's.

"Higher ROI is always better." ROI says nothing about risk, liquidity, or how much effort an investment demands. A rental property's return depends on your time and your exposure to repairs and vacancies; a fund requires neither. Compare ROI between investments with similar risk.

ROI for Rental Property

Real estate investors often use two versions:

  • Cash-on-cash return looks at one year: annual pre-tax cash flow divided by the cash you put in. A property that took $60,000 down, $8,000 in closing costs, and $7,000 in initial repairs ($75,000 in total) and produces $4,500 a year of cash flow after all expenses and the mortgage payment has a 6% cash-on-cash return.
  • Total ROI at sale adds appreciation and the loan principal you paid down, minus selling costs, for the whole holding period.

Borrowing magnifies ROI in both directions, because the return is measured against the cash you put in, not the full price. The guide to how to analyze a rental property and the rental property calculator go further.

ROI vs. ROE and Rate of Return

These terms get mixed up, but they measure different things:

  • ROI measures the return on a specific investment against what you put into it.
  • Return on equity (ROE) is a company-level ratio: a business's net income divided by its shareholders' equity. It tells you how efficiently a company uses its owners' money, not how your own investment performed.
  • Rate of return is often used interchangeably with ROI, though it usually implies a figure expressed per year: the annualized ROI.

A Quick Checklist

Before you trust an ROI figure, check that:

  1. The amount invested includes every purchase, holding, and improvement cost.
  2. The amount returned is net of selling costs and includes all income received.
  3. The result is annualized if you're comparing different holding periods.
  4. Taxes and inflation are accounted for if you want to know what you really kept.
  5. The investments being compared carry similar risk.

Putting It Together

Calculate ROI using the total amount genuinely at risk (including fees), add in any income received along the way, and annualize the result if you want to compare it against a different investment held for a different length of time.

The ROI calculator handles all three steps automatically: enter your costs and any income received, and it reports both your straight ROI and the correctly annualized figure. To project what a target return could grow into over time, use the investment calculator.

Frequently Asked Questions

What is a good ROI? It depends on the risk and the time involved. A common benchmark is the broad U.S. stock market, which has historically returned roughly 10% a year before inflation over long periods, with large swings from year to year. An investment with more risk or more work should offer more than that to be worth it; a safer one, like a savings account, will offer less.

What does a 30% ROI mean? You earned $0.30 of profit for every $1 you put in. On a $10,000 investment, a 30% ROI means $3,000 of profit, for $13,000 in total. Whether it's impressive depends on how long it took: 30% in one year is very different from 30% over ten.

Can ROI be negative? Yes. A negative ROI means you got back less than you invested. Spending $125,000 and getting back $100,000 is an ROI of −20%.

What is net ROI? It's ROI calculated after every cost (fees, taxes, maintenance, and selling costs) rather than on price changes alone. Net ROI is the figure that tells you what you actually kept.

Is ROI the same as profit? No. Profit is a dollar amount; ROI is that profit expressed as a percentage of what you invested, which lets you compare investments of different sizes.

Sources