TickerLeague

Stock Profit Calculator

Multi-lot cost basis, sell proceeds, dividends, flat or percent commissions, break-even price, ROI, and optional CAGR from dates.

Your true trade profit depends on more than the price difference — commissions, tax, and cost basis across multiple lots all affect your real return. Enter your trades below to see every component from gross proceeds to net profit.

Background reading: total return vs price return and ex-dividend, record & payment dates.

Buy

One row per purchase: shares, price, optional buy date.

Sell

One row per sale: shares, price, optional sell date.

Trading fees

One buy-side fee and one sell-side fee for all rows in Buy and Sell combined—not per row or per share.

Flat: total dollars for all purchases and for all sales. Percent: % of combined buy cost and combined sale proceeds.

Dividends (optional)

Total cash dividends on this stock for the holding period you model—not per share.

If you sell only part of your position, prorate dividends to match the shares you sell so results line up with this trade.

Tax (optional)

Simplified tax as a percent of realized capital gain.

Stock Profit Calculator: Trade ROI, Cost Basis & CAGR

Updated April 2026

Key Points

  • Net profit on a stock trade = sale proceeds − cost basis − commissions − taxes + dividends.
  • Calculator handles multi-lot purchases, partial sells, percent or flat commissions, and optional CAGR from dates.
  • ROI shows return on cost; CAGR annualizes that return for fair comparison across different holding periods.

What is true stock profit?

A trader’s headline “I bought at $50 and sold at $75” is rarely the actual profit. Real profit accounts for commissions on both sides, prorated cost basis when you sold only part of the position, dividends collected during the hold, and taxes on the realized gain. This calculator builds that full picture from your inputs.

How profit is calculated

Net Profit = (Sale Proceeds − Sell Commissions) − (Cost Basis + Buy Commissions) − Tax + Dividends. With multiple buy lots, the calculator computes a weighted-average buy price first; with partial sells it prorates cost basis to match the shares actually sold.

How to use the calculator

Add one row per purchase lot and one row per sale lot. Set commissions as either flat dollar amounts or a percent of the trade value. Optionally enter dividends collected and a tax rate on the realized gain. Add buy and sell dates to compute holding period and CAGR.

  • Buy lots — shares, price, and optional date for each purchase.
  • Sell lots — shares, price, and optional date for each sale.
  • Commissions — flat per side or percent of notional.
  • Optional — dividends received and a flat tax rate on realized gain.

Worked example

Buy 100 shares at $50 with a $5 commission ($5,005 total cost). Sell all 100 at $60 with a $5 commission ($5,995 proceeds). No dividends, no tax. Net profit = $5,995 − $5,005 = $990. ROI = $990 / $5,005 ≈ 19.8%. Break-even price = $50.10.

When to use ROI vs CAGR

ROI is the right metric when the holding period is fixed. Comparing two trades held for different lengths requires CAGR — the annualized return — so a 50% gain over 5 years (~8.4% CAGR) can be honestly compared to a 20% gain over 1 year (20% CAGR). Provide buy and sell dates to see CAGR alongside ROI.

Limitations

The simplified flat tax does not capture short-term vs long-term capital gains rules, wash-sale adjustments, or state tax. Currency effects on foreign listings are ignored. The calculator is for trade economics planning — not a substitute for your broker statements or your tax return.

Trade economics, not just price difference

A clean view of every dollar in and out of a position separates winning trades from those that look great on the price chart but actually leak value to commissions, taxes, and partial-sell accounting.

Frequently asked questions

What is the stock profit formula?

Net Profit = (Sell Price − Average Buy Price) × Total Shares − Buy Commission − Sell Commission − Tax + Dividends. If you bought at multiple prices, the calculator computes a weighted-average cost basis across all lots automatically.

How does partial selling work?

When you sell fewer shares than you bought, the calculator prorates your cost basis. For example, if you bought 100 shares at $50 ($5,000 total) and sell only 50 shares, it allocates $2,500 of cost to the sale. Commissions are also prorated proportionally. This gives an accurate profit figure for partial positions.

What is ROI on a stock trade?

Return on Investment (ROI) is net profit divided by total cost, expressed as a percentage. If you invest $5,000 and sell for $6,000 after $20 in commissions, your net profit is $980 and ROI is 19.6%.

How do commissions affect stock profits?

Commissions increase your cost basis and reduce proceeds. For example, buying 100 shares at $50 with a $10 commission means your total cost is $5,010, and your break-even price rises to $50.10 per share.

What is a break-even price?

The minimum sell price per share needed to cover your total cost (purchase price + commissions). Selling above break-even means profit; selling below means a loss.

How much tax do I pay on stock profits?

In the US, short-term gains (held under 1 year) are taxed as ordinary income (10–37%). Long-term gains (held over 1 year) are taxed at 0%, 15%, or 20% depending on income. This calculator applies a single flat rate for illustration only.

What is annualized return (CAGR)?

Compound Annual Growth Rate measures the smoothed annual return over a holding period. If you bought at $50 and sold at $75 after 2 years, CAGR ≈ 22.5%. Provide buy and sell dates to see CAGR in results.

How do I calculate cost basis with multiple purchases?

Use a weighted average: total cost of all shares divided by total shares. If you bought 50 shares at $40 and 50 shares at $60, your average cost basis is $50 per share. Add each purchase in the Buy section above to calculate automatically.

Should I include dividends in stock profit?

Yes. Dividends are part of total return. Including them gives a more accurate picture of your investment performance. Enter dividends received in the optional field above.

What is the difference between short-term and long-term capital gains?

In the US, stocks held for less than one year are taxed at short-term capital gains rates (10–37%, same as ordinary income). Stocks held for over one year qualify for long-term rates (0%, 15%, or 20% depending on income). The calculator shows a “short-term” or “long-term” badge next to the holding period when you provide buy and sell dates. The flat tax rate input is for illustration only—your actual rate depends on income, filing status, and holding period.

What is the difference between realized and unrealized gains?

Unrealized gains are paper profits on stocks you still hold—they appear on your brokerage statement but are not taxed until you sell. Realized gains occur when you actually sell at a profit, triggering a taxable event. This calculator models realized gains: it computes profit based on the buy and sell prices you enter.

What is the wash sale rule?

The IRS wash sale rule disallows a tax deduction on a stock sold at a loss if you repurchase the same or a substantially identical security within 30 days before or after the sale. The disallowed loss is added to the cost basis of the replacement shares. This calculator does not model wash sale adjustments—consult a tax professional if you frequently trade the same securities.

How does cost basis work — weighted average vs FIFO?

This calculator uses a weighted-average cost basis: total cost of all purchased shares divided by total shares. Some brokers default to FIFO (first in, first out), where the earliest purchased shares are considered sold first. FIFO can produce different tax outcomes when lot prices vary significantly. For exact tax reporting, check your broker’s default method or consult your tax records.