Investment Gain Calculator
You have sold an investment, or you are modelling a sale that has already happened in your head, and you want a straight answer: what did you actually make, how fast did you make it, and what is it worth in today’s money. That is a backward-looking question, and it needs a backward-looking tool. Enter what you put in, what you got out, how long you held it, and the costs and income along the way, and this calculator works out the net gain, the total return, the annualized return, and the inflation-adjusted result.
Do not confuse this with a projection. If you want to model money you have not invested yet, use the site’s investment growth calculator, which projects a lump sum plus regular contributions forward. This page looks back at a completed holding. The two tools answer opposite questions in time, and keeping them apart is what stops a forecast from being dressed up as a result.
Quick Answer
Put in $25,000, pay $500 in costs, receive $1,200 in income, and sell for $42,000 after 6 years, and the net gain is $17,700. That is a 69.41 percent total return, or 9.18 percent a year compounded, a 1.69x multiple on the $25,500 total cost. At 3 percent annual inflation, the gain in today’s money is $10,679.32, or 6.00 percent a year in real terms.
Takeaway: Total return tells you how much you made. Annualized return tells you how fast you made it, so holdings of different lengths can be compared fairly. The inflation-adjusted gain tells you what is left after rising prices, which is the figure that matters for spending power.
- Quick Answer
- What counts as cost, and what counts as return
- The three rates, and why they disagree
- A second worked example: the loss case
- The inflation adjustment, done honestly
- What this tool does not do
- What competing calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
What counts as cost, and what counts as return
The short answer is that total cost is the amount invested plus extra costs, and total return is the final value plus income received. Net gain is total return minus total cost. Everything else on this page is a way of expressing that one subtraction.
Costs belong on the cost side even when they feel small. A $500 commission on a $25,000 investment is 2 percent of the starting amount, and it comes straight off the gain. Fees paid at purchase and at sale both belong here, because both reduce what you keep. Income belongs on the return side only when it was actually paid out to you and is not already inside the final value. That distinction is the most common double-counting error with this kind of tool: dividends reinvested into more shares are already reflected in a higher final value, so adding them again as income inflates the result. Dividends paid out in cash, which you kept, are genuine return and belong in the income field.
Tax is deliberately not in this calculation. A gain for tax purposes is the amount realized minus the adjusted basis, and the IRS treats the holding period as the line between short-term and long-term treatment, with more than one year counting as long-term, according to IRS Topic 409 on capital gains and losses. Your tax bill depends on your income, your filing status, and the kind of asset, so a general calculator that guessed at a tax rate would mislead more people than it helped. Use the pre-tax gain here, then work out tax separately with a professional if the amount is large.
The three rates, and why they disagree
The short answer is that total ROI, annualized return, and the investment multiple all describe the same gain, but they answer different questions, and a holding can look excellent on one and ordinary on another.
Total ROI is net gain divided by total cost, times 100. For the worked example, $17,700 divided by $25,500 gives 69.41 percent. It is the simplest figure and the easiest to misread, because it ignores time completely: 69 percent over 6 years and 69 percent over 20 years are not the same achievement. The investment multiple is total return divided by total cost, which is $43,200 divided by $25,500, or 1.69x. It says every dollar of cost became $1.69 of return. Annualized return is the compound annual growth rate, which is total return divided by total cost, raised to the power of 1 divided by years, minus 1. For the worked example that is 1.6941 to the power of one sixth, minus 1, which is 9.18 percent a year. It is the steady yearly rate that would turn the cost into the return over the same period, and it is the figure to use when comparing holdings of different lengths.
| Figure | Worked example | What it answers |
|---|---|---|
| Net gain | $17,700 | How many dollars did I keep |
| Total ROI | 69.41% | How much, in percentage terms, overall |
| Annualized return | 9.18%/yr | How fast, per year, on a comparable basis |
| Investment multiple | 1.69x | How many times the cost came back |
| Inflation-adjusted gain | $10,679.32 | What the gain buys in today’s money |
| Real annualized return | 6.00%/yr | The yearly rate after inflation |
The tool also shows a verdict badge next to the main result. Read it as the tool’s own shorthand for the annualized figure, not as a market benchmark: the labels are fixed wordings tied to the annualized rate, and they say nothing about risk, about what comparable investments did over the same period, or about whether the same result will repeat. A high annualized return on a volatile holding and the same annualized return on a steady holding are not equally good outcomes, and this tool does not measure that difference.
A second worked example: the loss case
The short answer is that the same formulas handle losses without any special pleading, and a loss example is worth running because it exposes how annualized figures behave when the result is negative.
Put in $10,000, sell for $8,000 after 2 years, with no costs, no income, and no inflation. Total cost is $10,000, total return is $8,000, and net gain is minus $2,000. Total ROI is minus 20.00 percent. Annualized return is 0.80 to the power of one half, minus 1, which is minus 10.56 percent a year. The multiple is 0.80x, which says 80 cents came back for every dollar of cost. Notice that the annualized loss is smaller in magnitude than the total loss, because it is spread over two years. That is correct arithmetic, and it is also why an annualized figure should never be quoted without the total and the holding period beside it.
| Figure | Gain example (6 years) | Loss example (2 years) |
|---|---|---|
| Net gain | $17,700 | -$2,000 |
| Total ROI | 69.41% | -20.00% |
| Annualized return | 9.18%/yr | -10.56%/yr |
| Investment multiple | 1.69x | 0.80x |
A third case is worth knowing about, because it catches people out. If the amount invested and the extra costs are both zero, there is no cost base to divide by, so the tool reports ROI, annualized return, and the multiple as zero rather than crashing or printing an infinite figure. The dollar gain is still shown: put in $0, with no extra costs and no income received, receive $5,000 after 3 years at 2 percent inflation, and the net gain is $5,000 with an inflation-adjusted gain of $4,711.61. Percentages need a base; dollars do not.
The inflation adjustment, done honestly
The short answer is that the inflation-adjusted gain divides the total return by 1 plus the inflation rate, raised to the number of years, then subtracts total cost. It answers what the return would buy at today’s prices if inflation ran at the flat rate you entered.
For the worked example, 1.03 to the power of 6 is 1.1941, so $43,200 divided by 1.1941 is $36,179.32 in today’s money. Subtract the $25,500 total cost and the real gain is $10,679.32. The real annualized return applies the same annualization to that adjusted return, giving 6.00 percent a year. The gap between the nominal 9.18 percent and the real 6.00 percent is the whole point of the adjustment: almost a third of the yearly rate is price rises, not extra buying power.
The honesty condition matters. The tool uses one flat rate for the whole holding period, because that is what a simple backward-looking tool can do with a single input. Real inflation varies year by year, so if you need a historical adjustment against actual price indices, use a dedicated tool such as the site’s future inflation calculator for forward price questions, or check published price index series for the years you held. Do not treat a flat 3 percent assumption as a measurement of what actually happened to prices during your holding period.
What this tool does not do
The short answer is that it measures one holding, once, from start to finish. It does not measure risk, timing, or a whole portfolio, and those limits decide when you need a different tool.
First, it smooths the path. Annualized return is the steady rate that would produce the same endpoint, so a holding that doubled and then fell back looks identical to one that grew steadily to the same endpoint. If the journey matters to you, because you needed the money at a low point or you could not stomach the swings, the annualized figure alone will not tell you. Second, it assumes a single amount invested at the start, plus costs and income. If you added money in stages, withdrew along the way, or reinvested at changing prices, the timing of each cash flow matters, and a time-weighted or internal-rate-of-return calculation fits better than a single start-to-finish ratio. Third, it is one holding, not a portfolio. For a whole portfolio over time, including how its holdings combined and how it compared with a benchmark, the site’s portfolio performance calculator is the right companion page. For a single dividend stock, where the question is how much of the return came from price and how much from dividends, the site’s dividend-adjusted return calculator splits the return into its two parts instead of reporting one combined figure.
What competing calculators miss
The short answer is that most ROI tools stop at the two headline percentages, while this page keeps costs, income, the multiple, and the inflation-adjusted result in the same calculation.
CalculatorSoup’s ROI calculator is the strongest rival: it takes investment income and expenses into account, explains annualized ROI as the compound annual rate, and works through examples. Its gap for this question is that it does not report an inflation-adjusted gain or a real annualized return, so a reader has to do the purchasing-power step elsewhere. OnlyCalculators adds a genuinely useful reverse mode, solving for the return needed to hit a target ROI, plus a payback period, but it has no separate costs and income fields in the same form and no inflation adjustment. CalcuAtAny is clean and fast with just initial investment, final value, and years, and it states the formulas plainly, but that simplicity drops costs, income, the multiple, and inflation entirely. WOWA’s ROI calculator is honest about its own limit, warning that multi-cash-flow cases need an internal rate of return tool instead, but it is framed for Canadian investors and likewise has no inflation-adjusted result. EasyUnitConverter’s annualized return calculator does one job well, converting a total return into a compound annual rate, and nothing else. Orbit2x adds preset scenarios and year-by-year projections, which are useful for planning, but presets are scenarios chosen by the site, not results from your holding, and it does not give the real, inflation-adjusted gain.
Our winning moves are therefore specific. First, costs and income are first-class inputs, not afterthoughts, so the net gain is a kept gain rather than a gross price change. Second, the multiple sits beside the percentages, because 1.69x is often easier to grasp than 69.41 percent. Third, the inflation-adjusted gain and real annualized return are computed from the same inputs, so the nominal and real stories can be compared without re-entering anything. Fourth, losses, zero-cost cases, and fractional holding periods are handled explicitly instead of breaking or being hidden.
Frequently asked questions
ROI is the total percentage gain over the whole holding period: net gain divided by total cost. Annualized return is the steady yearly rate that would produce the same result over the same period. Use ROI for how much overall, and annualized return for comparing holdings held for different lengths of time.
Because final value alone is not what you kept. Costs paid along the way reduce your gain, and cash income paid out to you increases it. Total cost is amount invested plus extra costs, and total return is final value plus income received. Leaving either out gives a gross figure, not a net gain.
It is total return divided by 1 plus the inflation rate, raised to the number of years, minus total cost. For the worked example at 3 percent over 6 years, $43,200 becomes $36,179.32 in today’s money, leaving a real gain of $10,679.32. It uses one flat rate, so treat it as a purchasing-power comparison, not a measurement of actual historical prices.
Yes, by entering its current value as the final value. The result is a snapshot gain to today, not a forecast. If the price moves tomorrow, the answer moves with it, and the holding period should be updated to match the date of the value you entered.
Because it smooths the path into a steady yearly rate. Two holdings with the same endpoint and the same annualized return can have had very different journeys, one steady and one volatile. Always read it beside the total return, the holding period, and the dollar gain.
No. The result is pre-tax. For tax purposes, a gain is generally the amount realized minus the adjusted basis, and the IRS treats holdings of more than one year as long-term. Your rate depends on your own circumstances, so check IRS Topic 409 or a tax professional before acting on the figure.
Then this tool’s single start-to-finish ratio is an approximation, because it cannot weight when each addition was made. A holding with staged contributions, withdrawals, or reinvestment at changing prices is better measured with a time-weighted return or an internal rate of return, which account for the timing of each cash flow.
Add This Calculator to Your Website
Copy the code below and paste it into any page or post to embed this calculator. Choose a size first if you want a different width: the preview stays hidden until you pick a size.
References
- Internal Revenue Service. Topic No. 409, Capital Gains and Losses. Accessed October 25, 2026.
- Internal Revenue Service. Publication 550, Investment Income and Expenses. Accessed October 25, 2026.
- Board of Governors of the Federal Reserve System. Selected Interest Rates (H.15). Accessed October 25, 2026.
- Federal Deposit Insurance Corporation. National Rates and Rate Caps. Accessed October 25, 2026.
- TreasuryDirect. I Bonds. Accessed October 25, 2026.
- TreasuryDirect. Auction Announcements, Data and Results. Accessed October 25, 2026.
- Khan Academy. Introduction to Compound Interest. Accessed October 25, 2026.
- Khan Academy. Exponential Growth and Decay. Accessed October 25, 2026.
- Khan Academy. Introduction to Present Value. Accessed October 25, 2026.
- NerdWallet. What Is Compound Interest?. Accessed October 25, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. It Is Tax Time: Getting a Tax Refund? Consider Investing It. Accessed October 25, 2026.
