Stock Market Calculator
Knowing whether a stock trade made money takes more than comparing the buy and sell prices. This calculator runs the two computations investors actually need: the Trade profit tab prices a completed trade with dividends, fees and a break-even sell price, and the Annualized return (CAGR) tab turns a multi-year gain into a comparable yearly rate. It is the trade-level tool with fee, dividend and break-even handling; the sibling stocks return calculator is a separate, simpler tool with none of that.
CAGR smooths the result into an equivalent steady yearly rate, so you can compare investments held for different lengths of time.
Quick Answer
Buying 100 shares at $150 and selling at $175, with $52 of dividends and $9.90 of fees, nets $2542.10, a 16.94% return, and a break-even sell price of $149.58. A $10000 investment growing to $18000 over 3 years is an 80.00% total return, or 21.64% per year compounded. Both examples are pre-filled; open each tab and press Calculate to reproduce them.
Key takeaways
- True trade profit is (sell price × shares + dividends) − (buy price × shares + fees). Leaving out either adjustment flatters or punishes the result; the calculator keeps both visible as separate lines.
- The break-even sell price is (buy × shares + fees − dividends) ÷ shares. Dividends already received push it below your buy price, which is why flat-looking trades can still be winners.
- CAGR = (end ÷ start)1/years − 1. It converts any holding period into a comparable yearly rate, but it assumes one lump sum with nothing added or withdrawn.
- Small fees dominate small trades: $9.90 of commissions is 0.07% of a $15000 trade and 5% of a $200 trade. Measure fees against your position size, not in isolation.
- Quick Answer
- How to use the stock market calculator
- How stock returns are calculated
- Worked example: a profitable trade
- Worked example: annualized return
- Fees, dividends, and what this leaves out
- The break-even price, and why traders forget it
- What other stock calculators miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How to use the stock market calculator
Pick the tab that matches your question. Results stay hidden until you calculate, and each tab has its own Calculate and Reset.
- Trade profit: enter the buy price, sell price and share count, plus any dividends received and total commissions/fees. Click Calculate trade profit for the full breakdown including the break-even price. Both optional fields default to a pre-filled example; clear them to zero a field out.
- Annualized return (CAGR): enter the starting value, ending value and years held (fractions like 2.5 are fine). Click Calculate annualized return for the total return and the CAGR.
- Read the headline: net profit/loss at 32px on the trade tab, CAGR at 32px on the return tab, with the supporting lines beneath and a reading badge that states the result in plain words.
- Copy or share: each tab's results box has its own copy and share buttons, which stay guarded until that tab has been calculated.
Validation matches the original tool field by field: a blank buy price, sell price, share count, starting or ending value, or years each produce their own message, shares of zero or less are rejected, and the starting value and years must be positive. The dividends and fees fields are the exception: leave them blank and they count as zero.
How stock returns are calculated
The trade tab works from four numbers, and the formulas are simple on purpose so every line can be checked by hand:
Total proceeds = sell price × shares + dividends
Net profit = proceeds − investment
Return % = profit ÷ investment × 100
Break-even sell price = (buy × shares + fees − dividends) ÷ shares
CAGR = (ending value ÷ starting value)1 ÷ years − 1
Fees are commissions and any other transaction costs; dividends are the cash payouts collected while holding the shares. Both change the true result, which is why the calculator keeps them as separate fields instead of hiding them inside the prices. The dividends calculator can estimate payouts when you know the yield but not the total. For a sale you already made measured against a hypothetical earlier exit, the stock sell calculator focuses on the sell side, and for holding periods measured in days rather than years, the holding period return calculator covers that ground while the CAGR return calculator goes deeper on pure growth-rate analysis.
Worked example: a profitable trade
The pre-filled trade runs the full arithmetic: 100 shares bought at $150, sold at $175, $52 of dividends received, $9.90 of commissions paid.
Two more real runs of the trade tab, including a losing trade, so the sign handling is visible:
| Trade | Investment | Proceeds | Net profit | Return | Break-even |
|---|---|---|---|---|---|
| 100 × $150 → $175, div $52, fee $9.90 | $15009.90 | $17552.00 | $2542.10 | 16.94% | $149.58 |
| 100 × $50 → $80, div $25, fee $10 | $5010.00 | $8025.00 | $3015.00 | 60.18% | $49.85 |
| 50 × $200 → $170, div $0, fee $12 | $10012.00 | $8500.00 | $-1512.00 | -15.10% | $200.24 |
Worked example: annualized return
A 60% gain sounds the same whether it took two years or ten, but the yearly rate is very different. The pre-filled CAGR example grows $10000 to $18000 over 3 years: total return (18000 − 10000) ÷ 10000 × 100 = 80.00%, and CAGR = (18000 ÷ 10000)1/3 − 1 = 21.64% per year, the steady yearly rate that turns $10000 into $18000 in three years. The SEC's glossary defines the compound annual growth rate on exactly this basis.
| Start → end, years | Total return | CAGR |
|---|---|---|
| $10000 → $18000, 3 years | 80.00% | 21.64% |
| $5000 → $8000, 3 years | 60.00% | 16.96% |
| $25000 → $22000, 2 years | -12.00% | -6.19% |
The third row shows CAGR handling losses too. And the same 60% total gain would be a 26.49% CAGR over two years instead of 16.96% over three, which is why a bare percentage without a holding period tells you almost nothing.
Fees, dividends, and what this leaves out
Small costs matter more than they look. The $9.90 in the worked example is 0.07% of a $15000 trade; the same $9.90 on a $200 trade is nearly 5% of the capital gone before the price moves. This is the point the SEC makes about fees, and their fee guidance lists the questions to ask before assuming a quoted return is the return you keep. Dividends work the other way: ignoring them understates your true return, which is why the calculator adds them to proceeds separately instead of hiding them inside the sell price.
What the tool does not cover, stated plainly: taxes, where IRS Topic 409 sets out how capital gains and losses are treated and why holding period matters; stock splits and dividends paid in shares rather than cash, which change share counts and per-share prices together (the SEC glossary's stock split entry explains the mechanics); currency movement if you trade foreign stocks; and margin interest, which accrues on borrowed funds and is covered from the borrowing side by the stock margin calculator and FINRA's margin accounts guide. Treat every result here as a pre-tax, pre-split figure, and consult a qualified financial professional before making investment decisions.
The break-even price, and why traders forget it
Most stock calculators report the profit and stop. The break-even sell price answers the question traders actually ask mid-trade: at what price do I get out flat? It is (buy price × shares + fees − dividends) ÷ shares. Anything above that price is profit; anything below is a loss. It is especially useful when dividends have already offset part of your cost: in the second table row the break-even sits at $49.85 against a $50 buy price, because the $25 of dividends already covered part of the cost, so a sale one cent below the buy price still leaves money on the table.
The common mistake is anchoring on the buy price and treating it as the line between winning and losing. After fees the line sits above the buy price; after dividends it sits below. Knowing which side you are on before you place the exit order is the entire point of the number.
What other stock calculators miss
The stock-profit corner of the calculator web is crowded, and the tools divide into camps with visible gaps:
- Deep all-rounders (TradeZella's stock profit tool): the strongest rival, with split commissions, tax toggles, a break-even line and a day-based CAGR. Its strength is completeness; its cost is complexity, with seven inputs before the first result.
- Position managers (stockcalculator.io): excellent for tracking open positions with average cost basis and live recalculation. Gap: no CAGR at all, so multi-year performance cannot be annualized.
- Methodology-first tools (DQYDJ's stock calculator): publishes its formulas openly and supports buy/sell dates for the holding period. Gap: no break-even price and a dated interface.
- Tax-and-sensitivity tools (Ultimate Finance Calculator, Calciflow, FreeWebTools): tax estimates, profit-sensitivity tables and batch modes for a year of closed positions. Gap: none of the three annualizes into a CAGR on the same screen.
- The gap this page fills: trade profit and CAGR in one card with two tabs, the break-even price computed alongside the profit instead of as an afterthought, dividends and fees as first-class inputs rather than footnote adjustments, and an explicit list of what the numbers leave out, from taxes to splits to currency.
Frequently asked questions
Multiply the sell price by the shares and add any dividends received for the total proceeds, multiply the buy price by the shares and add all fees for the total investment, then subtract. In the worked example: $17552.00 of proceeds minus $15009.90 of investment = $2542.10 of net profit.
The share price at which the trade nets exactly zero: (buy price times shares + fees - dividends) divided by shares. On the worked example it is $149.58, below the $150 buy price because the $52 of dividends already covered part of the cost. Anything above it is profit; anything below is a loss.
Total return measures the whole gain over the holding period; CAGR converts it into the steady yearly rate that would produce the same result. An 80% total gain over 3 years is a 21.64% CAGR, while the same 80% over 10 years is only 6.05% per year. Use total return for "how much" and CAGR for comparing investments held for different lengths of time.
Yes. Dividends are cash you received from the investment, so leaving them out understates your true return. This calculator adds them to the proceeds separately rather than hiding them inside the sell price, which also keeps the break-even price honest: dividends already collected lower the price you need to exit flat.
It depends on the trade size. The $9.90 in the worked example is 0.07% of a $15000 trade and barely moves the needle; the same $9.90 on a $200 trade is nearly 5% gone before the price moves. Small, frequent trades are where commissions do their damage.
Yes. If the ending value is below the starting value, CAGR reports the average annual rate of decline: $25000 falling to $22000 over 2 years is a -6.19% CAGR. The Annualized return tab accepts an ending value below the start and computes it the same way.
No. Every figure here is pre-tax. Capital gains treatment depends on your country and holding period; in the U.S., the IRS distinguishes short-term and long-term gains in Topic 409. Apply your own tax estimate to the net profit rather than treating the calculator's number as take-home money.
Taxes, stock splits and dividends paid in shares rather than cash, currency movement on foreign stocks, and margin interest on leveraged positions. It also assumes one buy and one sell: it does not track multiple lots or money added and withdrawn mid-period. For the borrowing side of a leveraged trade, use the stock margin calculator.
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
- U.S. Securities and Exchange Commission, Investor.gov. Glossary: Compound Annual Growth Rate. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. Glossary: Dividend. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. Glossary: Stock Split. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. Introduction to Investing: Stocks. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. Understanding Fees. Accessed October 23, 2026.
- U.S. Securities and Exchange Commission, Investor.gov. The Fuss About Fees. Accessed October 23, 2026.
- Financial Industry Regulatory Authority (FINRA). Investing Basics: Stocks. Accessed October 23, 2026.
- Financial Industry Regulatory Authority (FINRA). Margin Accounts. Accessed October 23, 2026.
- Internal Revenue Service. Topic No. 409, Capital Gains and Losses. Accessed October 23, 2026.
- Charles Schwab. Margin Loans: Margin Trading Account. Accessed October 23, 2026.
