# Stock Profit Calculator

Calculate stock trade profit or loss, brokerage fees, and overall return on investment based on your purchase and sale prices.

---

- **Canonical URL:** https://dothecalculation.com/calculators/stock-profit-calculator
- **Category:** Financial calculators
- **Publisher:** Do The Calculation (https://dothecalculation.com)
- **Cost:** Free, no account or sign-up required
- **Privacy:** Runs entirely in the browser; inputs are never sent to a server
- **Methodology:** https://dothecalculation.com/methodology

---

## Stock Profit Calculator — Net Profit, ROI, and After-Tax Proceeds

Calculate stock trade profit after factoring in buy/sell share prices, broker commissions, dividend income, and capital gains taxes — with net profit and ROI shown side by side.

- Net profit and ROI calculations
- Broker commissions offset
- After-tax proceeds projections

## The Anatomy of a Stock Trade's Profit

A stock trade's real profitability is the capital gain (price appreciation between buy and sell) plus any dividends received during the holding period, minus broker commissions and estimated capital gains taxes. Looking only at the raw share-price gain overstates what you actually keep.

While many modern brokerages offer "zero-commission" trading on U.S. equities, options contracts, international trades, and some premium or full-service brokers still charge per-trade commissions on both the buy and the sell leg. This tool isolates every one of those variables so you can see exactly where your gross gain gets reduced before it reaches your account.

## How to Use This Calculator

Enter the number of shares, the price you bought at, the price you plan to sell at (or already sold at), your broker's commission per trade, any dividend income received while holding the position, and your expected capital gains tax rate.

The calculator applies the commission on both the buy and the sell side automatically (since almost every broker charging a commission charges it on each leg of the trade), then walks the gross gain down through dividends, commissions, and taxes to a final net profit and ROI figure.

## The Stock Profit Formulas

To calculate the net after-tax profit and ROI of a stock transaction, apply the following equations:

$$I_{\text{capital}} = \text{Shares} \times \text{Buy Price}$$

$$P_{\text{gross}} = \text{Shares} \times \text{Sell Price}$$

$$\text{Commission Cost} = \text{Commission per trade} \times 2$$

$$\text{Gross Profit} = P_{\text{gross}} - I_{\text{capital}} - \text{Commission Cost} + \text{Dividends}$$

$$\text{Estimated Tax} = \max(0, \text{Gross Profit} \times \text{Tax Rate}\%)$$

$$\text{Net Profit} = \text{Gross Profit} - \text{Estimated Tax}$$

$$\text{ROI (\%)} = \frac{\text{Net Profit}}{I_{\text{capital}}} \times 100$$

## Worked Example: 100 Shares, $50 to $65, with Dividends

Buy 100 shares at $50 (investment = $5,000), sell at $65 (gross proceeds = $6,500), pay a $5 commission on both the buy and sell ($10 total), collect $120 in dividends while holding, and expect a 15% tax rate on the gain.

Gross profit: $6,500 − $5,000 − $10 + $120 = $1,610.

Estimated tax: $1,610 × 15% = $241.50.

Net profit: $1,610 − $241.50 = $1,368.50.

ROI: $1,368.50 ÷ $5,000 × 100 ≈ 27.4%.

Notice the $120 in dividends added directly to the gross profit before tax — on a trade this size, dividends contributed roughly 7.5% of the total gross gain, which is easy to overlook if you only track the share-price move.

## The Impact of Dividends on Total Return

The capital gain is only one component of a stock's yield. Many established, profitable companies distribute dividends — cash payouts per share, usually paid quarterly — directly to shareholders. Whether you collect that cash or automatically reinvest it (DRIP), it is part of your total return and belongs in any real profit calculation, which is why this calculator adds total dividend income straight into gross profit rather than treating price appreciation as the whole story.

## Taxes on Stock Gains: Short-Term vs. Long-Term

Capital gains taxes materially change what a winning trade actually nets you. In the U.S., positions held one year or less are taxed as short-term capital gains at your ordinary income tax rate (up to 37% federally). Positions held longer than one year qualify for preferential long-term capital gains rates — 0%, 15%, or 20% depending on income — which is a significant reason many investors deliberately hold past the one-year mark before selling. Enter your specific expected rate to get a realistic after-tax estimate rather than assuming your full gain is tax-free.

## What This Calculator Doesn't Cover

This is a single-trade worksheet, so it doesn't account for wash-sale rules (selling at a loss and rebuying a substantially identical security within 30 days, which disallows the loss for tax purposes), multiple lots purchased at different prices and dates (which need lot-level cost-basis tracking), options premiums and assignment, or margin interest on leveraged positions. For a straightforward buy-then-sell equity trade, though, it captures every dollar that separates your headline gain from what actually lands in your account.

## Finding Your Break-Even Price

Before a trade shows any real profit, the sale price has to cover the original purchase price plus both commissions and offset any tax drag on the gain. Using the worked example above — $50 buy price, $10 total commission on 100 shares (10 cents per share) — the stock needs to trade at roughly $50.10 per share just to break even before dividends or taxes, and higher still once a tax rate is applied to whatever gain remains. Running the numbers at a few candidate sell prices before placing an order is a fast way to see whether a target price actually clears your true break-even point.

## When a Trade Loses Money

The same formula works in reverse for a losing trade. If those same 100 shares bought at $50 were sold at $45 instead of $65, gross proceeds would be $4,500 against a $5,000 investment — a $500 loss before commissions, meaning gross profit would be negative even before the $10 in commissions is subtracted. In that scenario the tax calculation drops out entirely (the formula only applies tax to a positive gross profit), and any dividends collected during the holding period become the only thing offsetting the loss. Understanding this asymmetry — taxes apply to gains but don't create a refund on losses within this single-trade view — is part of why realized losses are usually tracked separately for tax-loss harvesting purposes.

## Choosing a Realistic Tax Rate

The tax rate you enter should reflect your actual expected capital gains treatment, not a guess. If you have held the shares for a year or less, use your marginal ordinary income tax rate — federal brackets alone run from 10% up to 37%, and most states add their own tax on top. If you have held for more than a year, use your applicable long-term capital gains rate, which for most filers is 0%, 15%, or 20% depending on total taxable income. Investors near a bracket threshold, or holding a position close to the one-year mark, often find it worth re-running this calculator at both the short-term and long-term rate to see exactly how much waiting a few extra weeks to sell could be worth in net profit.

## Comparing Scenarios Before You Trade

Because every input is editable, the fastest way to use this calculator before placing an order is to run it three times: once at your realistic target sell price, once at a conservative price you'd still be satisfied with, and once at a price where you'd want to cut losses. Comparing the resulting net profit and ROI across all three gives a clearer picture of the trade's real risk/reward than looking at a single projected outcome, and takes under a minute once the other inputs (shares, commission, tax rate) are already filled in.

## Related Calculators

For a precise tax bill on this gain, use the [capital gains calculator](/calculators/capital-gains-calculator), and if you also hold losing positions, see whether harvesting them first would offset this tax with the [tax loss harvesting calculator](/calculators/tax-loss-harvesting-calculator).

## Frequently asked questions

### Does this calculator include stock dividends?

Yes. You can enter the total dividend income received during your holding period, and it is added directly to your gross profit.

### How do broker commissions affect stock profit?

Commissions are transaction fees charged by brokers. They increase your purchase cost and reduce your sale proceeds, lowering net profits.

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

Short-term gains (assets held 1 year or less) are taxed as ordinary income. Long-term gains (held over 1 year) are taxed at lower capital gains tax brackets (usually 0%, 15%, or 20%).

### What is cost basis in stock trading?

Cost basis is the total price paid to acquire shares, including the stock price plus the initial broker buy commission.

### Does the calculator account for wash sales?

No. Wash sales (selling stock at a loss and buying substantially identical shares within 30 days) have specific tax adjustment rules not covered by this spot trade calculator.

### Are stock commissions tax-deductible?

Yes. For tax purposes, buying commissions are added to the cost basis and selling commissions are deducted from the sale proceeds, reducing taxable capital gains.

### What are net proceeds?

Net proceeds are the total cash received from a stock sale after deducting selling broker commissions and estimated capital gains tax liabilities.

### Can I calculate option trade profits here?

This tool is designed for equity shares. Options involve contracts, premiums, and leverage, which require specialized derivative calculators.

### How do taxes affect my ROI?

Taxes reduce your net profit. An investment with a high pre-tax return can have a lower after-tax ROI compared to tax-free yields like municipal bonds.

### What is a dividend reinvestment plan (DRIP)?

A DRIP is a program that automatically uses cash dividends to purchase additional shares of the underlying stock, compounding your holding size over time.

### How do I calculate my break-even stock price?

Add your buy price to the per-share cost of both commissions (total commission divided by shares). The stock must trade above that combined figure before a sale produces any profit.

### What happens to the tax estimate if my trade loses money?

The calculator only applies estimated tax to a positive gross profit — a loss produces no tax charge, since capital losses reduce your tax bill separately rather than being taxed themselves.

### Does this calculator handle multiple purchases of the same stock at different prices?

No — it models one buy price and one sell price for a single lot. If you bought shares in several batches at different prices, calculate each lot separately using its own cost basis.

## Related concepts

- **Dividend Yield** — Annual dividend payments per share divided by the current stock price.
- **Wash Sale Rule** — IRS regulation preventing tax deductions for losses if matching shares are purchased within 30 days.
- **Capital Gains Tax** — The tax assessed on investment profits based on holding periods.
- **Break-even price** — The sale price at which a trade covers its purchase price and commissions with zero profit or loss.
- **Tax-loss harvesting** — Realizing investment losses on purpose to offset taxable gains elsewhere in a portfolio.

## Related guides

- [Capital Gains Tax Guide: Basis, Selling Costs, and After-Tax Sale Proceeds](https://dothecalculation.com/blog/finance/capital-gains-tax-guide) — Estimate taxable gain more accurately by separating sale price, adjusted basis, selling costs, tax assumptions, and after-tax proceeds.
- [Dividend Investing Guide: Yield, Growth, Safety, and Ex-Dividend Basics](https://dothecalculation.com/blog/finance/dividend-investing-basics) — Learn how dividend income is estimated, why yield alone can mislead, and how growth, safety, taxes, and ex-dividend timing affect real income planning.
- [ROI Calculation: Formula, Annualized Return, and Examples](https://dothecalculation.com/blog/business/roi-calculation) — Calculate ROI and annualized return with total costs included, compare opportunities consistently, and understand what a simple ROI result leaves out.

## Related calculators

- [Crypto Profit Calculator](https://dothecalculation.com/calculators/crypto-profit-calculator) — Estimate cryptocurrency trading profit, exchange fees, and percentage return based on your buy and sell prices instantly.
- [ROI Calculator](https://dothecalculation.com/calculators/roi-calculator) — Measure return on investment by calculating gain, loss, and annualized performance for any investment or business decision.
- [Car Lease vs Buy Calculator](https://dothecalculation.com/calculators/lease-vs-buy-calculator) — Compare monthly car lease payments against purchase financing costs to decide which option saves you more money overall.
- [Tax Loss Harvesting Calculator](https://dothecalculation.com/calculators/tax-loss-harvesting-calculator) — Estimate tax savings and loss carryforward amounts by netting capital gains against harvestable investment losses each year.
- [BRRRR ROI Calculator](https://dothecalculation.com/calculators/brrrr-calculator) — Evaluate Buy, Rehab, Rent, Refinance, Repeat investment deals by calculating cash left in the deal, equity created, and overall return on investment.
- [Blended Marketing ROI (ROMI) Calculator](https://dothecalculation.com/calculators/marketing-roi-blended-calculator) — Estimate blended marketing return on investment from incremental sales and total marketing spend to see overall campaign effectiveness.

---

_This tool is for educational purposes only. Asset returns, trading fees, capital gains tax liabilities, dividend payments, and bond yields depend on market conditions, broker commissions, local tax codes (e.g. IRS short vs. long-term classifications), and individual credit/holding terms. Always consult a certified financial planner, licensed CPA, or tax professional before making major investment or liquidation transactions._

---

_Source: [Do The Calculation](https://dothecalculation.com/calculators/stock-profit-calculator). Quote freely with attribution and a link to this page._
