To calculate the realized return on an investment you sold, add your sale proceeds to any cash distributions you received while holding it, subtract your cost basis, and divide the result by your cost basis. Multiply by 100 to express it as a percentage. That single figure captures both the price change and any income the investment paid out. To compare investments held for different lengths of time, convert that figure into an annualized return using (1 + realized return)1/n − 1, where n is the number of years you held it.
The formula is simple. The work is in getting each input right.
The Three Numbers You Need
Realized return depends on three figures: your total cost basis, your sale proceeds, and any income the investment paid out along the way.
Cost basis is what you paid to acquire the asset, including fees like commissions or transfer charges.1Internal Revenue Service. Publication 550, Investment Income and Expenses Most major brokerages dropped commissions on stock and ETF trades years ago, so for many investors the cost basis is just the purchase price. If you bought mutual funds with load fees or traded through a platform that still charges commissions, add those in.
Sale proceeds are what you received when you sold, net of any fees deducted at the time of sale. Your brokerage’s trade confirmation shows the final figure.
Distributions are the cash the investment paid you while you held it: dividends from stocks, interest from bonds, or capital gain distributions from mutual funds. These get reported on Form 1099-DIV and Form 1099-B at year-end.2Internal Revenue Service. About Form 1099-B, Proceeds from Broker and Barter Exchange Transactions If you took them as cash, they count as money received. If you reinvested them, they’re handled differently, covered further down.
The Formula
Realized Return = (Sale Proceeds + Distributions − Cost Basis) ÷ Cost Basis
The numerator is your total profit or loss, combining price change with income. The denominator is the money you had at risk. The result is a decimal; multiply by 100 for a percentage.
A Worked Example
You buy 200 shares at $50, paying $10,000. Over two years you collect $500 in cash dividends. Then you sell all 200 shares at $60, receiving $12,000.
- Total received: $12,000 + $500 = $12,500
- Net profit: $12,500 − $10,000 = $2,500
- Realized return: $2,500 ÷ $10,000 = 0.25, or 25%
That 25% covers everything the investment produced: $2,000 in appreciation and $500 in dividend income. Leave the dividends out and you’d report a 20% return, understating what you actually earned.
The same math handles losses. If those shares sold for $40 instead of $60, sale proceeds would be $8,000. Adding $500 in dividends gives $8,500 received, minus $10,000 basis, for a $1,500 loss. Divide −$1,500 by $10,000 and you get a realized return of −15%.
Reinvested Dividends Raise Your Cost Basis
Reinvested dividends work differently. Each reinvested payment buys additional shares, and those new shares push up your total cost basis.3Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property You still owe tax on those dividends in the year received, even though you didn’t pocket the cash. Because they’re already in your basis, they don’t count as “distributions” in the numerator when you sell.
Suppose you invest $10,000 and reinvest $1,000 in dividends over time. Your cost basis is now $11,000. When you sell for $13,000:
- Net profit: $13,000 − $11,000 = $2,000
- Realized return: $2,000 ÷ $11,000 = 18.2%
The common error is using the original $10,000 as the basis while also leaving reinvested dividends out of received cash. That double-counts nothing and undercounts everything. Use the adjusted cost basis shown on your brokerage statement or Form 1099-B.1Internal Revenue Service. Publication 550, Investment Income and Expenses
Partial Sales: Which Shares Did You Sell?
If you sell only part of a position and bought the shares at different times and prices, which shares count as sold changes your cost basis, your realized return, and your tax bill. The IRS recognizes three methods.4Internal Revenue Service. Publication 551, Basis of Assets
- First-in, first-out (FIFO) is the default. Your oldest shares are treated as sold first. In a rising market, FIFO usually produces the largest gain.
- Specific identification lets you designate exactly which lots to sell by telling your broker at the time of trade. This gives you the most control over the gain’s size and tax character.
- Average cost is available for mutual fund shares and for stock acquired through a dividend reinvestment plan. Total cost divided by total shares gives an average per-share basis.
Without instructions, your brokerage will default to FIFO. Investors who want to shrink a taxable gain often use specific identification to sell their highest-cost lots first. Whichever method you pick flows straight into the cost basis number in the formula.
Annualizing the Return
A 25% return means one thing over one year and something very different over ten. Annualizing converts any holding period into an equivalent one-year rate that accounts for compounding.
Annualized Return = (1 + Total Return)1/n − 1
Total Return is your realized return as a decimal. The variable n is the number of years held; for fractional periods, convert days to years by dividing by 365.
Take the 25% return from the earlier example, held for two years:
- 1 + 0.25 = 1.25
- 1.251/2 = 1.1180
- 1.1180 − 1 = 0.1180, or 11.8%
The annualized return is 11.8%, not 12.5%. Simple division (25% ÷ 2) overstates annual performance because it ignores that second-year gains build on first-year gains. Earn 11.8% twice in a row with reinvestment and you land at roughly 25%.
The formula also works for holding periods under a year. A 40% return in six months (n = 0.5) annualizes to (1.40)1/0.5 − 1 = 96%. That figure is mathematically correct but assumes you could sustain the pace for a full year, which is why short-period annualized numbers deserve caution.
Real Return: Adjusting for Inflation
The numbers above are nominal. They don’t account for the purchasing power inflation took from you while your money was invested. A 7% return in a year with 3% inflation didn’t grow your real wealth by 7%.
Real Return = (1 + Nominal Return) ÷ (1 + Inflation Rate) − 1
If your annualized return was 11.8% and inflation averaged 2.7% (the Congressional Budget Office’s projection for 2026),5Congressional Budget Office. The Budget and Economic Outlook: 2026 to 2036 your real return would be (1.118) ÷ (1.027) − 1 = 8.86%.
For quick estimates, subtracting inflation from nominal return (11.8% − 2.7% = 9.1%) gets you close. The full formula is more precise because it captures the compounding interaction between returns and inflation.
After-Tax Realized Return
Realized return is a pre-tax number. What you keep depends on your holding period and your income. The IRS draws a hard line at one year: gains on assets held more than 12 months are long-term capital gains; anything sold sooner is short-term.6Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses
Short-term gains are taxed as ordinary income, at federal rates from 10% to 37% for 2026 depending on taxable income.7Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Long-term gains get preferential rates:
- 0% on taxable income up to $49,450 for single filers ($98,900 for married filing jointly)
- 15% from $49,450 to $545,500 for single filers ($98,900 to $613,700 for joint filers)
- 20% above those thresholds
An additional 3.8% net investment income tax applies if modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), pushing the top federal rate on long-term gains to 23.8%.8Internal Revenue Service. Topic No. 559, Net Investment Income Tax Many states also tax capital gains, with rates ranging from 0% to over 13%.
To estimate the after-tax figure, multiply the gain by your combined rate and subtract. On the $2,500 gain above, an investor in the 15% long-term bracket with no NIIT exposure owes $375, keeping $2,125. Dividing $2,125 by the $10,000 basis gives an after-tax realized return of 21.25%, versus 25% pre-tax. The gap widens fast at higher tax rates.
A Note on Losses and Wash Sales
A negative realized return has a tax use. Net capital losses beyond your gains can offset up to $3,000 of ordinary income for the year ($1,500 if married filing separately), with the remainder carrying forward indefinitely.9Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses
One boundary to know if you’re calculating a loss you plan to claim: the wash sale rule. If you sell at a loss and buy a substantially identical security within 30 days before or after the sale, the IRS disallows the loss.10Internal Revenue Service. Case Study 1: Wash Sales The disallowed amount gets added to the basis of the replacement shares, deferring the benefit until you sell those. Your brokerage flags wash sales in Box 1g of Form 1099-B, so the adjustment shows up at tax time whether you tracked it or not.
Keep Records That Back Up the Numbers
Brokerages track cost basis for covered securities bought after 2011, but the IRS puts the burden on you to keep records of purchase price, commissions, adjustments for stock splits, nondividend distributions, and any other basis changes.11Internal Revenue Service. 2025 Instructions for Schedule D (Form 1040) – Capital Gains and Losses For older holdings or assets transferred between brokerages, basis data sometimes goes missing, and you’ll need to reconstruct it from old confirmations, statements, or historical prices.
Getting basis wrong doesn’t just skew your realized return. It changes your tax bill in one direction or the other. Overpay and you lose money you didn’t owe. Underpay and you’ll owe the difference with interest when the IRS notices. Verify the basis on each lot before you file.