Stocks Return Calculator
What did the trade actually make? Enter buy and sell prices, shares, dividends per share, fees and the holding period to get the full breakdown: capital gain, dividend income, costs, net profit, total ROI and the annualized return (CAGR), judged against the S&P 500’s long-run average.
Figures are pre-tax: taxes take a real bite out of returns. Educational estimates only, not investment advice.
Quick Answer
Buy 100 shares at $100, sell at $150, collect $2 per share in dividends, pay $20 in fees, hold 3 years: capital gain $5,000, dividends $200, net profit $5,180, total ROI 51.70%, annualized CAGR 14.90%/yr, above the S&P 500's long-run ~10% nominal average. Change any number above to run your own trade.
Key takeaways
- Net profit = (sell − buy) × shares + dividends − fees. The price gain is only one of the four lines that decide the trade.
- ROI divides by the total outlay including fees, not the share cost alone. Ignoring fees inflates every return you compute.
- CAGR is the number to compare across trades: a 51.70% total return over 3 years is 14.90%/yr, but the same 51.70% stretched over 10 years is only 4.26%/yr.
- All figures here are pre-tax and nominal. Taxes and inflation take their cut afterward, and the tool says so up front.
- Quick Answer
- How to use the stock return calculator
- The stock return formulas, line by line
- Worked example: the $5,180 trade, checked step by step
- Why CAGR beats total return when you compare trades
- Do not ignore the dividend line
- The three silent killers: fees, taxes, inflation
- What competing calculators miss
- How this page differs from the neighboring stock tools
- Frequently asked questions
How to use the stock return calculator
Enter one trade, click Calculate, and read the full post-mortem. The results stay hidden until you calculate.
- Buy and sell prices per share: what you paid and what you sold for. Testing an open position? Use the current market price as the sell price.
- Number of shares: the size of this trade. Fractional shares work.
- Dividends per share: total cash dividends received per share over the whole holding period, not per year. Leave blank or 0 if the stock paid nothing.
- Total fees: every trading cost combined, buy-side and sell-side. Commission-free brokers made this field small, but bid-ask spreads and account fees still live here for active traders.
- Holding period: years held. Enter it and you get the annualized CAGR plus the benchmark verdict; leave it blank or 0 for a total-return-only result.
The badge under the results calls the trade profitable or losing at a glance, and the formula lines show every intermediate number so you can check the arithmetic by hand. Pressing Enter in any field runs the calculation, and Reset restores the worked-example trade.
The stock return formulas, line by line
A stock's total return has four moving parts: price change, dividends, fees and time. The tool computes each one explicitly, in this order:
Dividends = dividends per share × shares
Net profit = capital gain + dividends − fees
Total ROI = net profit ÷ (buy price × shares + fees) × 100
CAGR = (total in ÷ total out)1/years − 1, where total in = proceeds + dividends and total out = cost + fees
Two details matter. First, the ROI denominator is the total outlay including fees, which is the convention finance references use: return = profit divided by what you actually spent, commissions included. Second, the CAGR treats dividends as part of the ending value, so it measures the constant yearly rate that turns your outlay into your total proceeds. That is the number you compare against the market, not the total ROI.
Worked example: the $5,180 trade, checked step by step
Buy 100 shares at $100, sell at $150, collect $2 per share in dividends, pay $20 in fees, hold 3 years. The tool is pre-filled with exactly this trade.
Type these numbers in and the tool returns every figure above, including the "Above the S&P 500 long-run average" verdict, since 14.90 beats 10. The table below runs four more trades through the tool, each a real calculation you can reproduce.
| Trade | Net profit | Total ROI | CAGR |
|---|---|---|---|
| 100 × $100 → $120, no div, no fees, no years entered | $2,000.00 | 20.00% | – |
| 50 × $80 → $60, $10 fees, 2 years | $-1,010.00 | -25.19% | -13.51%/yr |
| 150.5 × $12.345 → $15.789, $0.32 div, $7.95 fees, 0.5 years | $558.53 | 29.93% | 68.83%/yr |
| 100 × $100 → $110, no fees, 1 year | $1,000.00 | 10.00% | 10.00%/yr |
Notice the losing trade: the tool flags it explicitly with "This trade lost money" and a red reading badge, and the 68.83%/yr figure on the half-year trade shows why annualizing short sprints is honest math but dangerous bragging.
Why CAGR beats total return when you compare trades
Total return ignores the clock; CAGR puts every investment on the same one. The worked trade's 51.70% total return sounds spectacular until you learn it took 3 years: 14.90%/yr. The same 51.70% stretched over 10 years would be just 4.26%/yr, worse than bonds.
The whole gain over the whole period. Good for one trade's post-mortem; useless for comparing a 3-year trade against a 10-year hold.
The constant yearly rate that produces the total return, compounding included. This is the number that goes head to head with an index fund.
That is why the tool's headline verdict is the CAGR line, not the ROI: beating the S&P 500's ~10%/yr nominal long-run average means your annualized rate cleared it, not just your total. Note the asymmetry too: a -25% ROI needs a +33% gain to get back to even, which is why the losing trade's -13.51%/yr CAGR stings more than the headline suggests.
Do not ignore the dividend line
Dividends add to total return dollar for dollar: a 4% dividend yield plus 6% price growth is a 10% total return, and the tool counts every cent. This matters more than most new investors expect, because reinvested dividends compound: the S&P 500's long-run average of roughly 10%/yr nominal is a total-return figure that includes dividends, as the historical dataset behind that number makes clear. A price-only comparison against the index silently gives away a couple of points a year.
Enter dividends as the total per-share cash received over the holding period, not the annual yield. If a stock paid $0.50 quarterly for 3 years, that is $6.00 per share in the dividends field. For the full dividend-income picture, including yield math, the dividends calculator covers income-focused analysis.
The three silent killers: fees, taxes, inflation
The tool handles fees. Taxes and inflation are on you, and they are not small.
- Fees. They sit in both the numerator (subtracted from profit) and the denominator (added to outlay), so they hit returns twice. The SEC's own investor guide notes that on a 20-year investment, a 1% annual fee cuts the ending balance by 18%. Commission-free trading shrank this line, but it did not erase it.
- Taxes. The tool shows pre-tax figures. The IRS taxes the difference between sale proceeds and cost basis as a capital gain or loss; holds over a year generally get lower long-term rates than short-term trades taxed as ordinary income, and dividends have their own rules. A 14.90% nominal CAGR taxed at 15% is about 12.66% after tax, before inflation even enters.
- Inflation. Real return = (1 + nominal) ÷ (1 + inflation) − 1. A 10% nominal return at 3% inflation is 6.80% real, which is why the S&P 500's ~10% nominal average is only ~7% in real terms. Chain all three together on the worked trade and that 14.90% headline lands near 9.4% real after tax: still good, but a different number than the one that got you excited.
What competing calculators miss
Stock return tools cluster into three camps, and each drops something this page keeps:
- Commission-first tools (free-online-calculator-use and similar): careful buy/sell commission math with a worked formula, matching this tool's ROI convention. But no holding-period field, no annualization, and no benchmark: a 40% ROI with no clock attached cannot be compared to anything.
- Annualized tools (SuperCalc, ReturnsCalc): proper CAGR and total-return formulas with fee-impact analysis. But the component breakdown is thin: gain, dividends and fees are not itemized the way this page's four lines show them, so you cannot see which line drove the result.
- Quick earnings tools (owncalculator-style): fast profit and return percentage from five inputs. But no fees field at all in some, no dividends in others, and no annualized comparison.
- The gap this page fills: the full component split (gain, dividends, fees each on their own line), ROI on the fee-inclusive outlay, CAGR from any holding period including fractional years, an explicit losing-trade flag instead of a quiet negative number, and the S&P 500 benchmark verdict on every annualized result.
How this page differs from the neighboring stock tools
This is the single-trade post-mortem tool: one buy, one sell, one set of shares. The stock sell calculator covers the mechanics of selling a position; the stock price change calculator isolates the price move as a percentage; the stock purchase calculator works out what a buy costs; and the stock market calculator looks at the market level rather than one trade. For the broader portfolio picture, including diversified funds, the ETF investment calculator models fund-level investing. Come here when the question is "what did this trade actually return," all costs counted.
Frequently asked questions
Net profit = (sell price − buy price) × shares + total dividends − fees. That is the whole trade on one line: price gain, income, and costs together.
Compound annual growth rate: (ending value ÷ starting value) raised to the power of 1/years, minus 1. It is the constant yearly rate that would turn your outlay into your proceeds, compounding included, which is why it is the fair way to compare trades of different lengths.
Dividends add to total return dollar for dollar. The S&P 500's long-run average of roughly 10%/yr is a total-return figure that includes dividends, so a price-only comparison against the index silently gives away a couple of points a year.
The S&P 500 has averaged about 10% nominal, near 7% after inflation, over the long run. Clearing that consistently, year after year, is genuinely hard, which is why the tool judges every CAGR against it.
Yes. Divide net profit (after fees) by the total outlay including buy-side fees. Leaving fees out of the denominator inflates every return you compute.
Profits are taxed as capital gains on the difference between sale proceeds and cost basis. Holds longer than a year generally get lower long-term rates than short-term trades, which are taxed as ordinary income. This tool shows pre-tax figures.
ROI is the total gain over the whole holding period; CAGR is the annualized rate that produces it. Same profit, different clocks: 51.70% over 3 years is 14.90%/yr, but over 10 years it is only 4.26%/yr.
Yes, and this tool flags losing trades explicitly with a red badge and a "This trade lost money" line instead of letting a negative number sit quietly in the breakdown.
Real return = (1 + nominal) ÷ (1 + inflation) − 1. A 10% nominal return at 3% inflation is about 6.80% real, which is the number that measures actual purchasing-power growth.
Add This Calculator to Your Website
Embed this calculator on your own site with the code below. Pick a size to preview it live, then copy the code.
Powered by Calculator Zilo
References
- Financial Industry Regulatory Authority (FINRA). Investing Basics. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission. Taking Stock: Planning for Retirement and Other Long-Term Goals. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission. Saving and Investing: A Roadmap to Your Financial Security Through Saving and Investing (PDF). Accessed October 23, 2026.
- Internal Revenue Service. Topic No. 409, Capital Gains and Losses. Accessed October 23, 2026.
- Internal Revenue Service. Topic No. 404, Dividends. Accessed October 23, 2026.
- Aswath Damodaran, NYU Stern School of Business. Historical Returns on Stocks, Bonds and Bills: 1928-2024. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. Compound Interest Calculator. Accessed October 23, 2026.
- U.S. Bureau of Labor Statistics. Consumer Price Index (CPI) Program. Accessed October 23, 2026.
- Alabama State Department of Education. Personal Finance: Return on Investment. Accessed October 23, 2026.
- Saylor Academy. Personal Finance: Investing. Accessed October 23, 2026.
- Nicolet College. Personal Finance: Investments and Markets, a Brief Overview. Accessed October 23, 2026.
