ROI calculator

Return on investment, profit and annualized ROI for any period, with an optional side-by-side comparison of two investments.

loading ROI calculator
About this tool

What is an ROI calculator?

ROI, return on investment, tells you how much you gained or lost compared with what you put in. The formula is simple: subtract the cost from the final value, then divide by the cost. If you invested 10,000 and ended with 13,000, the ROI is 3,000 divided by 10,000, which is 30%. This calculator does that arithmetic, shows the profit in money, and adds the number most people forget: the annualized ROI, which says what that return is worth per year once you tell it how long the money was tied up.

The period matters because the same 30% means very different things after one year and after five. The annualized figure compounds the return: it asks which steady yearly rate, applied year after year, would turn the cost into the final value. That makes two investments of different lengths comparable. You can also switch on the comparison and put a second investment next to the first. The tool says which one earned more per year, or which one has the higher total ROI if you did not give periods.

Everything runs in your browser. The numbers you type are never sent anywhere, and nothing is looked up. You choose the display currency for the money lines; it only changes how the amounts are written, it does not convert anything. The page opens with a worked example so you can see the result before typing.

How to calculate ROI

  1. Type the amount invested (the cost) and the final value: what you received back, or what the investment is worth today. Include the original amount in the final value, not only the gain.
  2. Optionally type the period and choose years or months. Leave it empty if you only want the plain ROI.
  3. Read the ROI, the profit and, when you gave a period, the annualized ROI. Every line has a copy button.
  4. To compare, tick "Compare with a second investment" and fill in the B values. Use the same unit for both periods.
  5. Use "Copy results" to paste everything into a message or a spreadsheet.

If your costs came in pieces (an initial price plus fees, repairs or taxes), add them up first and type the total as the cost. If the money arrived over time, the NPV and IRR calculator handles a full cash flow.

Examples

10,000 grows to 13,000 in two years

ROI = (13,000 - 10,000) / 10,000 = 30% and the profit is 3,000. Over 2 years, the annualized ROI is 1.3 raised to 1/2, minus 1, which is 14.02% a year. Typing 24 months instead of 2 years gives the same result.

A loss: 10,000 falls to 7,500

ROI = (7,500 - 10,000) / 10,000 = -25%, a loss of 2,500. A negative ROI is read the same way as a positive one; the annualized rate over one year is also -25%.

Two investments of different length

Investment A turns 10,000 into 13,000 in 3 years: ROI 30%, annualized 9.14% a year. Investment B turns 8,000 into 9,600 in 18 months: ROI 20%, annualized 12.92% a year. A has the larger total ROI, but B earns more per year of money tied up, and the comparison names B as the better return. Without the periods, the tool compares only the total ROI and warns you that the periods are missing.

Total loss

If the final value is 0, the ROI is -100% and the tool warns that the whole amount was lost.

Common mistakes

  • Forgetting the principal in the final value. If you invested 10,000 and received 3,000 of profit, the final value is 13,000, not 3,000. Typing the profit alone gives an ROI of -70%.
  • Comparing ROI across different periods. A 30% ROI in five years is worse than 20% in one year. Use the annualized ROI.
  • Ignoring costs. Fees, taxes, maintenance and your own time reduce the real return. Put them in the cost or subtract them from the final value.
  • Ignoring inflation. A 5% ROI in a year with 6% inflation lost purchasing power. The inflation calculator shows the real figure.
  • Reading annualized ROI as a promise. It is a smoothed average of what already happened, not a forecast.

Frequently asked questions

What is a good ROI?

There is no single number. It depends on the risk and the time. Compare the annualized ROI with what a safe alternative pays in the same period, and with inflation. An ROI that does not beat both is hard to justify.

How is ROI different from profit?

Profit is an amount of money (final value minus cost). ROI is that profit as a share of what you invested, so it lets you compare a small investment with a large one.

What is the difference between ROI and CAGR?

They are the same idea: annualized ROI is the CAGR of the investment. The CAGR calculator is built around two values and a time span, with a projection and the time to double.

Can ROI be negative?

Yes. When the final value is below the cost, the ROI is negative. It cannot go below -100%, which is losing everything.

Does this tool include taxes and fees?

No. It uses exactly the numbers you type. Add taxes and fees to the cost, or subtract them from the final value, to see the net result. To see how a percentage of a value works, use the percentage calculator.

Formulas in code

JavaScript

const roi = (cost, final) => (final - cost) / cost;
const annual = (cost, final, years) => (final / cost) ** (1 / years) - 1;
console.log(roi(10000, 13000));       // 0.3
console.log(annual(10000, 13000, 2)); // 0.14017542509913805

Python

cost, final, years = 10000, 13000, 2
print((final - cost) / cost)          # 0.3
print((final / cost) ** (1 / years) - 1)  # 0.14017542509913805
Report a problem