ROI Calculator
Calculate return on investment after fees and income received, annualize it from holding dates, and compare two investments side by side.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the ROI Calculator?
Return on investment (ROI) answers a simple question: for every dollar I put in, how much did I get back on top? The ROI Calculator takes the amount invested, the amount returned when you sold or closed the position, the fees and costs you paid, and any income you collected along the way, then reports the net profit, the total ROI and the annualized ROI.
Annualizing is what makes ROI comparable. A 49% gain over four and a half years and a 23% gain over two years are hard to rank until both are turned into a yearly rate. Turn on the comparison and you can enter a second investment with its own dates; the tool tells you which one earned more per year and charts both.
Holding periods can be entered as buy and sell dates or as a number of years. All the arithmetic is shown in the formula panel and runs in your browser.
- Total and annualized ROI with net profit
- Costs and fees added to the basis, income added to the return
- Holding period from exact dates or years
- Side-by-side comparison of two investments with a bar chart
- Flags when the higher total ROI is the lower yearly return
- Formula panel, copy and share link
How to use the ROI Calculator
- Enter the amount invested and the amount returned (the sale value or current value).
- Add costs and fees, and any income such as dividends, interest or rent received while you held it.
- Enter the holding period as buy and sell dates, or as a number of years.
- Read the total ROI, annualized ROI, total cost, total received and net profit.
- Turn on Compare with a second investment, fill in investment B, and read which one earned more per year.
Worked examples
A stock held for four and a half years
Input
Invested 10,000, sold for 14,500, fees 150, dividends 600, 1 Mar 2021 to 1 Sep 2025
Output
Net profit 4,950; ROI 48.77%; annualized 9.22%
Cost is 10,150 and the amount received is 15,100. Leaving out the fees and dividends would have reported 45%, which understates the result.
Comparing it with a shorter investment
Input
B: invested 10,000, sold for 12,400, fees 50, held 2 years
Output
ROI 23.38%; annualized 11.08%
Investment A has twice the total ROI, but B earned more per year. The calculator flags this case, because ranking by total ROI rewards whichever investment was held longest.
A rental property
Input
Purchase 60,000 cash, costs 9,000, net rent 21,000, sold for 75,000 after 5 years
Output
ROI 39.13%; annualized 6.83%
Closing costs and repairs go in costs and net rent goes in income. A 15,000 rise in price alone would suggest 25%, but the costs and rent change the picture.
Background and insight
The basic formula is ROI = (what you received − what it cost) ÷ what it cost. Here, cost is the amount invested plus fees, commissions, closing costs and taxes paid to make or exit the investment, and received is the sale value plus dividends, interest or rent collected. Treating costs as part of the basis matches how most finance courses and brokerages define it, and it stops a high-fee investment from looking better than it was.
Annualized ROI is (1 + ROI)^(1 ÷ years) − 1. It is the compound yearly rate that would produce the same total, the same calculation as CAGR. Dividing the total ROI by the number of years instead (simple annualization) overstates the yearly rate for gains and should be avoided when comparing investments. For periods under a year the annualized figure is larger than the total: a 15% gain in six months annualizes to 32.25%.
ROI ignores when the income arrived and treats it as if it were received at the end. For investments with many cash flows at different times, such as a rental property with monthly rent and periodic repairs, IRR or XIRR is more precise. ROI remains the quickest way to sanity-check a deal and to compare simple buy-and-sell investments.
Common use cases
Reviewing a sold investment
Work out what a stock, fund, crypto position or collectible actually returned after fees and dividends.
Ranking two opportunities
Compare two investments held for different lengths of time on a per-year basis.
Business and marketing spend
Measure the return on a campaign, a piece of equipment or a training programme from its cost and the profit it produced.
Property deals
Combine purchase costs, rent received and the sale price into one ROI and one yearly rate.
Tips and limitations
- Use profit, not revenue, as the return for business projects. A campaign that brings in 50,000 of sales at a 30% margin returned 15,000, not 50,000.
- Include taxes you paid on the sale in costs if you want an after-tax ROI.
- If you added money in several instalments, ROI on the total is only approximate. The Investment Returns Calculator handles dated cash flows with XIRR.
- Annualized ROI over very short periods is unstable. A few days of gains can annualize to hundreds of percent.
- A total loss shows as -100% total and -100% annualized.
Frequently asked questions
How do you calculate ROI?
ROI = (amount received − total cost) ÷ total cost. If you invested 10,000, paid 150 in fees, received 600 in dividends and sold for 14,500, the ROI is (15,100 − 10,150) ÷ 10,150 = 48.77%.
How do I annualize ROI?
Use (1 + ROI)^(1 ÷ years) − 1. A 48.77% ROI over 4.5 years is 1.4877^(1/4.5) − 1 = 9.22% a year. Dividing 48.77% by 4.5 would give 10.8%, which overstates it because it ignores compounding.
Should fees be included in ROI?
Yes. Commissions, account fees, closing costs and taxes reduce what you earned. Adding them to the cost basis gives a lower but more honest ROI, and makes high-fee and low-fee options comparable.
What is the difference between ROI and annualized ROI?
Total ROI is the whole gain over the holding period, whatever its length. Annualized ROI converts it to a yearly compound rate so investments held for different lengths of time can be compared fairly.
What is a good return on investment?
It depends on the risk and the alternatives. A useful benchmark is the annualized return you could have had from a low-cost index fund or a savings account over the same dates. An investment that beat neither did not earn its risk.
Is ROI the same as profit margin?
No. ROI divides profit by the money invested, while profit margin divides profit by revenue. A shop can have a 10% profit margin and a 40% ROI if it turns its inventory over several times a year.
Is there an in-depth guide to the ROI Calculator?
Yes. “Time Value of Money: PV, FV, NPV, IRR, CAGR and ROI Explained” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.