Skip to main content

Stock Profit / Loss Calculator

Calculate realized trade profits, percentage ROI, capital gains taxes, brokerage commissions, and break-even share exit prices.

A stock profit loss calculator computes the net monetary gain or loss and percentage return on investment (ROI) from buying and selling equities. By deducting purchase costs, sell proceeds, brokerage commissions, regulatory fees, and capital gains taxes, it reveals your true net return and break-even share price.
1. Trade Execution Details Shares & Prices
Total quantity of shares traded
Original entry execution price
$
Closing trade market execution price
$
2. Commissions, Fees & Taxes Frictions
Flat fee charged on entry ($0 at major US brokers like Schwab/Fidelity)
$
$
Cash dividends collected while holding the position
$
Break-Even Target: To cover your purchase cost of $15,000.00 plus trading/regulatory fees ($0.51), the stock must sell for at least $150.01 per share.
Capital & Returns Composition Waterfall Ratio
Cost Basis 78%
Net Gain 18%
Tax 4%
Invested Basis
Net Profit
Taxes & Fees
Trade Metric Value
Shares Traded 100
Total Purchase Cost Basis $15,000.00
Gross Sale Proceeds $18,500.00
Pre-Tax Gross Profit +$3,499.49
Trading Fees & SEC / FINRA Deductions $0.51
Estimated Capital Gains Tax -$524.92 (15.0%)
Net Post-Tax Profit / Loss +$2,974.57
Net Return on Investment (ROI) +19.83%
Break-Even Exit Share Price $150.01

Stock Profit & Loss Formulas

Accurate equity accounting requires factoring in execution pricing, transaction frictions, and tax treatments according to standard GAAP and IRS rules:

1. Long Trade (Standard Buy & Sell): Total Cost Basis = (Shares × Buy Price) + Buy Commission Gross Proceeds = Shares × Sell Price Total Frictions = Sell Commission + SEC Fee ($0.0000278) + FINRA TAF ($0.000166) Gross Profit = (Gross Proceeds - Total Frictions - Total Cost Basis) + Dividends ROI (%) = (Gross Profit / Total Cost Basis) × 100 2. Short Trade (Sell Short & Cover): Gross Short Proceeds = Shares × Short Entry Price Buy-to-Cover Cost = (Shares × Cover Price) + Buy Commission Gross Profit = (Gross Short Proceeds - Total Frictions) - Buy-to-Cover Cost - Dividends Paid 3. Break-Even Exit Share Price: Break-Even Price = (Total Cost Basis + Sell Frictions - Dividends) / Shares 4. Net Post-Tax Profit: Capital Gains Tax = Max(0, Gross Profit) × Tax Rate Net Profit = Gross Profit - Capital Gains Tax
Authoritative US Financial Regulations & Tax Rules:
1. IRS Publication 550 (Investment Income and Expenses): Cost basis rules, capital asset classification, and wash-sale rules under IRC § 1091.
2. U.S. Securities and Exchange Commission (SEC) Fee Rate Advisory #31: Statutory transaction fees applied to sales of exchange-listed securities.
3. Financial Industry Regulatory Authority (FINRA) Schedule A, Section 1(b): Trading Activity Fee (TAF) parameters.
4. IRS Topic No. 409 (Capital Gains and Losses): Guidelines on holding periods (> 1 year for long-term treatment).

How to Calculate Stock Profit and Loss

  1. Calculate Total Purchase Cost Basis: Multiply the number of shares bought by your purchase price per share and add any broker commission fees paid upon entry.
  2. Calculate Gross Sale Proceeds: Multiply the total shares sold by your selling price per share.
  3. Deduct Transaction and Regulatory Fees: Subtract your exit commission, the SEC transaction fee, and the FINRA Trading Activity Fee from your gross sale proceeds.
  4. Add Accrued Dividend Distributions: Add all qualifying cash dividends received during the investment holding period to your trading return.
  5. Calculate Net Capital Gain and Taxes: Subtract your total purchase cost from your net sale proceeds. Multiply positive gains by your applicable federal/state capital gains tax rate (e.g., 15% long-term or ordinary income rates for short-term trades) to determine your final take-home profit.

Worked Real-World Trading Examples

Example 1: Long Swing Trade on Apple (AAPL)
An investor purchases 200 shares of Apple at $160.00 per share with $0 commission. After holding for 14 months, the shares are sold at $195.00 per share, collecting $75.00 in quarterly dividends:

  • Purchase Basis: 200 shares × $160.00 = $32,000.00.
  • Gross Sale Proceeds: 200 shares × $195.00 = $39,000.00.
  • Regulatory Fees: SEC Fee ($1.08) + FINRA TAF ($0.03) = $1.11.
  • Pre-Tax Gross Profit: $39,000.00 - $1.11 - $32,000.00 + $75.00 = +$7,073.89.
  • Long-Term Capital Gains Tax (15%): $7,073.89 × 0.15 = $1,061.08.
  • Net Profit: +$6,012.81 (18.79% Net ROI).
  • Break-Even Share Price: ($32,000.00 + $1.11 - $75.00) ÷ 200 = $159.63 per share.

Example 2: Target Profit Reverse Pricing
You buy 500 shares of an index ETF at $50.00 per share ($25,000 investment). You want a net profit of $2,500 after paying an estimated 15% capital gains tax:

  • Pre-Tax Gain Required: $2,500 ÷ (1 - 0.15) = $2,941.18.
  • Required Sale Proceeds: $25,000 + $2,941.18 = $27,941.18.
  • Target Exit Price: $27,941.18 ÷ 500 = $55.88 per share (+11.76% share gain).

Pre-Calculated Stock Return Matrix (100 Shares)

The table below outlines gross profit and ROI across common share price advances assuming a 100-share long position:

Entry Price +5% Gain +10% Gain +15% Gain +20% Gain +25% Gain +50% Gain
$25.00 ($2,500 basis) +$125.00 +$250.00 +$375.00 +$500.00 +$625.00 +$1,250.00
$50.00 ($5,000 basis) +$250.00 +$500.00 +$750.00 +$1,000.00 +$1,250.00 +$2,500.00
$100.00 ($10,000 basis) +$500.00 +$1,000.00 +$1,500.00 +$2,000.00 +$2,500.00 +$5,000.00
$150.00 ($15,000 basis) +$750.00 +$1,500.00 +$2,250.00 +$3,000.00 +$3,750.00 +$7,500.00
$200.00 ($20,000 basis) +$1,000.00 +$2,000.00 +$3,000.00 +$4,000.00 +$5,000.00 +$10,000.00
$300.00 ($30,000 basis) +$1,500.00 +$3,000.00 +$4,500.00 +$6,000.00 +$7,500.00 +$15,000.00

Key Stock Trading & Tax Terms

  • Cost Basis: The total original purchase price of an equity position, including purchase commissions and transaction charges, used to determine capital gains or losses.
  • Wash-Sale Rule (IRS IRC § 1091): Disallows claiming a tax loss if you purchase the same or a substantially identical stock within 30 calendar days before or after the loss-generating sale. The disallowed loss is added to the cost basis of the repurchased shares.
  • Short-Term vs. Long-Term Capital Gains: Securities held for 365 days or less generate short-term capital gains taxed at ordinary income tax brackets (up to 37%). Holdings held greater than 365 days qualify for long-term rates (0%, 15%, or 20%).
  • SEC Section 31 Fee: A small government fee assessed exclusively on stock sales to fund the SEC operating budget ($27.80 per million dollars of gross sale volume).
  • Short Selling: Borrowing shares through a brokerage to sell at current market prices with the intent of buying them back ("covering") at a lower price in the future to realize a profit.

Frequently Asked Questions

How is stock profit or loss calculated? ▾
Stock profit or loss is calculated by subtracting your total purchase cost (shares multiplied by buy price plus buy commission) from your net sale proceeds (shares multiplied by sell price minus sell commissions and regulatory fees), plus any dividends received during the holding period.
How do you calculate the break-even stock price? ▾
The break-even stock price is the exact share exit price needed to cover all purchase costs, buy/sell commissions, and transaction fees so your net profit equals zero. It is calculated by dividing your total invested capital and selling fees by the number of shares held.
What is the difference between short-term and long-term capital gains on stocks? ▾
Stocks held for one year or less are subject to short-term capital gains tax, taxed at your ordinary federal income tax rate (10% to 37%). Stocks held for more than one year qualify for preferential long-term capital gains tax rates of 0%, 15%, or 20% depending on taxable income.
What fees are deducted when selling US stocks? ▾
When selling US stocks, brokers deduct trading commissions (if applicable), the SEC Section 31 transaction fee ($27.80 per million dollars of principal sold), and the FINRA Trading Activity Fee (TAF, currently $0.000166 per share sold, capped at $8.30 per trade).
✓ Copied to Clipboard!