DigiCalc

How to Calculate Return on Investment (ROI) Step by Step

· 8 min read

Return on investment is one of the most useful numbers in personal finance — and one of the most misunderstood. The basic formula is simple, but calculating return on investment correctly means knowing what to include in your costs, what to include in your returns, and how to compare investments that ran for different lengths of time. This guide walks through the formula, real examples, and the common mistakes that lead people to wildly overstate or understate their actual gains.

What is return on investment (ROI)?

ROI measures the efficiency of an investment — how much profit you made relative to what you put in. It's expressed as a percentage, which makes it easy to compare a $500 stock gain to a $50,000 real estate profit even though the raw dollar amounts are completely different.

ROI is a total return metric, not an annualized one. A 30% ROI on a trade you held for one month is dramatically different from a 30% ROI on a rental property you held for ten years — but the raw percentages look identical. Knowing this distinction is critical before you start comparing investments or making decisions based on ROI alone.

The ROI formula

The core calculation is straightforward:

ROI = (Net Profit ÷ Total Cost) × 100

Where:

  • Net Profit = Total return received − Total cost
  • Total Cost = Everything you spent to make the investment (purchase price, fees, closing costs, improvements, etc.)
  • Total Return = Everything you received from the investment (sale proceeds, dividends, rental income, etc.)

You can also write it as:

ROI = ((Return − Cost) ÷ Cost) × 100

Both equations give the same result. The key is being comprehensive about what goes into "cost" and "return" — shortcuts there are where most calculation errors happen.

How to calculate ROI: step-by-step examples

Example 1: Stock investment

You buy 100 shares of a company at $30/share. You pay $7 in brokerage commissions. Two years later, you sell all 100 shares at $42/share and receive $8 in brokerage commissions on the sale. During those two years, you also received $120 in dividends.

  • Total cost: (100 × $30) + $7 = $3,007
  • Total return: (100 × $42) − $8 + $120 = $4,312
  • Net profit: $4,312 − $3,007 = $1,305
  • ROI: ($1,305 ÷ $3,007) × 100 = 43.4%

Many people would calculate this as ($4,200 − $3,000) ÷ $3,000 = 40%. That's 3.4 percentage points too low because it ignores dividends and commission costs on both sides. In a real portfolio, those errors compound over many trades into a significant miscalculation.

Example 2: Rental property

You buy a rental property for $200,000. You pay $8,000 in closing costs and spend $12,000 on repairs before renting it out. Over five years, you collect $90,000 in total rent and pay $55,000 in expenses (mortgage interest, taxes, insurance, maintenance). At the end of year five, you sell for $240,000, paying $14,400 in realtor fees.

  • Total cost: $200,000 + $8,000 + $12,000 = $220,000
  • Total return: ($90,000 − $55,000) + ($240,000 − $14,400) = $35,000 + $225,600 = $260,600
  • Net profit: $260,600 − $220,000 = $40,600
  • ROI: ($40,600 ÷ $220,000) × 100 = 18.5% over five years

That's a total ROI of 18.5% — decent, but not spectacular when spread over five years. The annualized version of that return (about 3.5% per year) tells a more useful story for comparison purposes.

Example 3: Business investment

You invest $15,000 in a side business. Over two years it generates $22,000 in revenue and costs $9,000 to operate. You sell the business for $4,000.

  • Net profit from operations: $22,000 − $9,000 = $13,000
  • Total return: $13,000 + $4,000 = $17,000
  • ROI: ($17,000 − $15,000) ÷ $15,000 × 100 = 13.3% over two years

For quick calculations across all of these scenarios, the ROI calculator handles the arithmetic instantly — plug in your cost and total return and it gives you both the percentage and a dollar multiple.

Total ROI vs annualized ROI (CAGR)

Total ROI is useful for understanding a single investment's overall profit. But when you want to compare two investments held for different time periods, you need to annualize the return. The formula is:

Annualized ROI = ((1 + ROI/100)^(1/years) − 1) × 100

Using the stock example above: 43.4% ROI over 2 years. Annualized: ((1 + 0.434)^(1/2) − 1) × 100 = 19.8% per year. That's the CAGR — a useful number for comparing this investment against a stock index, another trade held for 3 years, or a savings account.

For long-term wealth building, the compounding effect of consistent annual returns matters more than a single high-ROI event. The compound interest calculator can show you what a given annual return actually produces over 10, 20, or 30 years — the difference between 7% and 10% per year looks small at year one but enormous at year 30.

What counts as a good ROI?

There's no universal "good" ROI because the answer depends on three things: the asset class, the time horizon, and the risk involved. Some benchmarks:

  • Stocks (U.S. equity index): Historically 7–10% annualized after inflation. Individual stock picks have higher variance — both up and down.
  • Real estate: 8–12% total annual return (appreciation plus net rent) is considered solid for residential properties. Markets vary enormously.
  • Small business: Most analysts target 15–20%+ to justify the time, capital, and risk involved. Below 10% and you'd likely do better in a passive index fund.
  • Savings accounts / CDs: 4–5% currently, with near-zero risk. The baseline any investment must beat to justify its additional risk.

The key principle: ROI is only meaningful compared to a relevant benchmark. A 12% total ROI on a 5-year stock position sounds fine — until you realize the index returned 80% over the same period. Always compare like for like, preferably using annualized figures.

Common ROI calculation mistakes

Ignoring time value of money

A 50% ROI over 20 years is deeply unimpressive. A 50% ROI over 6 months is extraordinary. Always annualize when comparing across different holding periods — raw total returns without time context are almost meaningless for decision-making.

Forgetting hidden costs

For stocks: brokerage commissions, bid-ask spread on illiquid securities, and currency conversion fees if trading foreign equities. For real estate: closing costs on both ends, maintenance reserves, vacancy periods, and property management fees. For businesses: your own time (at an opportunity cost). Missing these inputs overstates your real return.

Excluding taxes

Pre-tax and post-tax ROI can differ dramatically depending on the asset and how long you held it. A 30% pre-tax gain taxed at 22% (short-term) nets you 23.4%. The same gain held long enough to qualify for 15% long-term capital gains leaves you with 25.5% — a meaningful difference. If you're comparing investment options, compare them on an after-tax basis.

Confusing ROI with cash-on-cash return

In real estate especially, ROI and cash-on-cash return (CCR) are different metrics. CCR measures annual cash income divided by cash invested — useful for evaluating year-to-year cash flow. ROI captures total wealth change including appreciation. Both are useful; confusing them leads to poor decisions.

ROI and your broader financial picture

Optimizing ROI on individual investments is only part of the equation. For long-term wealth building, what matters is also where those returns compound. The same 8% annual return inside a tax-advantaged retirement account compounds far more effectively than an 8% return in a taxable brokerage account where you pay taxes on dividends and realized gains along the way.

If you're evaluating whether your current investment strategy is generating enough return to hit a retirement goal, the retirement readiness framework walks through how to measure progress against a target number — including the assumptions about long-term returns that your projection is implicitly making.

Calculate your investment's ROI in seconds

Try the ROI Calculator →

ROI is the starting point for evaluating any investment — simple enough to calculate on a napkin, nuanced enough to mislead you if you skip the details. Use the full cost and return figures, annualize when comparing across time periods, account for taxes, and always compare against a relevant benchmark. With those four habits in place, ROI becomes one of the most powerful tools in your financial toolkit.