Skip to main content
CodeLint.Dev Dev Tools

ROI Calculator — Simple and Annualised

Return on investment in both absolute and annualised terms, so holding periods can be compared fairly.

ROI Calculator

years
months

Net Profit

+2,500

ROI

50.00%

Annualised ROI

22.47%

per year over 2.0y

Total Return Value

7,500

Formula

ROI = (Net Gain / Cost) × 100 = (+2,500 / 5,000) × 100 = 50.00%

Simple and annualised ROI

Simple ROI ignores time entirely, which makes it useless for comparing investments held for different lengths. Annualising fixes that.

ROI = (gain − cost) ÷ cost × 100 annualised = (1 + ROI)^(1 ÷ years) − 1

gain
Total value received, including income as well as sale proceeds
cost
Total invested, including fees and transaction costs
years
Holding period, which may be fractional

Worked example

Invested
10,000
Sold for
15,000
Holding period
3 years
Simple ROI
50%
Annualised
1.5^(1/3) − 1

Simple ROI 50% · Annualised ≈ 14.5% per year

A 50% return over three years and a 50% return over ten are not comparable, and simple ROI reports them identically. Always annualise before comparing.

Getting the inputs right

  • Include every costBrokerage, spread, stamp duty, custody fees and management charges are all part of "cost". Excluding them systematically overstates returns.
  • Include income, not just priceDividends, interest, rent and coupons are part of the gain. Ignoring them badly understates income-producing assets.
  • Consider tax where it differsTwo investments with identical pre-tax returns are not equivalent if one is taxed at income rates and the other at capital gains rates.
  • Compare against the alternativeA 6% return is good against cash and poor against a market index that returned 12% over the same period. The benchmark is part of the judgement.
  • Use XIRR for irregular cash flowsROI assumes one investment and one exit. Anything with contributions or withdrawals along the way needs a money-weighted measure.

About

The ROI Calculator measures the efficiency of an investment by comparing the net gain or loss against the initial cost. A positive ROI means the investment made money; negative means a loss. The annualised ROI adjusts the raw return for the holding period to produce a per-year rate comparable across different investments regardless of how long they were held. This tool supports any asset type — stocks, real estate, business, or any capital outlay.

How to use

  1. 1 Enter the initial investment amount (cost basis).
  2. 2 Enter the final value at the time of sale or evaluation.
  3. 3 Optionally enter the holding period in years to get annualised ROI.
  4. 4 Include any income received (dividends, rent) in the gain field for total return.
  5. 5 Compare multiple investments using the results panel.
What is ROI and how is it calculated?
ROI (Return on Investment) measures the profitability of an investment as a percentage of its cost. The formula is ROI = (Net Gain ÷ Cost of Investment) × 100, where Net Gain = Final Value − Initial Cost. For example, investing $5,000 and receiving $6,500 gives a net gain of $1,500 and an ROI of 30%.
What is the difference between ROI and annualised ROI?
ROI is the total percentage return regardless of how long the investment was held. Annualised ROI converts that total return into a per-year rate, making it comparable across investments of different durations. A 30% ROI over 6 months is far better than a 30% ROI over 5 years — annualised ROI (CAGR) reveals this difference.
Does ROI account for risk?
No. ROI only measures the return relative to cost — it does not factor in volatility, probability of loss, or opportunity cost. Two investments with the same ROI can have vastly different risk profiles. For a more complete picture, consider risk-adjusted metrics like the Sharpe ratio, or compare ROI against a benchmark like a market index return for the same period.