Stock Profit Calculator

Stock profit is (sell price − buy price) × shares, minus commissions and regulatory fees, plus any dividends received. This stock profit calculator also handles short sales, an amount to invest instead of a share count, the SEC Section 31 fee and the FINRA trading activity fee, and turns buy and sell dates into a holding period, an annualized return and an optional after-tax result.

Net profit or loss–
Return–
Break-even price–
Position

Inputs Example values A hypothetical trade. Replace them with your own; use a dot for decimals.

Size the trade by
Exit given as

Fees

Dates and tax (optional)

Shares
–
Entry value
–
Exit value
–
Gross profit or loss
–
Commissions (both trades)
–
SEC Section 31 fee
–
FINRA TAF
–
Total fees
–
Dividends
–
Net profit or loss
–
Returnnet ÷ entry value incl. entry costs
–
Holding period
–
Annualized return (CAGR)
–
Break-even exit priceincl. fees and dividends
–
Exit price for the target profit
–
Estimated tax
–
After-tax profit
–
After-tax return
–

Profit at different exit prices

Net profit or loss at different exit prices

Price moveExit priceNet profit or lossReturn

Everything runs in your browser. Nothing you type is saved or sent.

How to use the stock profit calculator

  1. Choose long or short. Long means you buy first and sell later. Short means you sell borrowed shares first and buy them back later.
  2. Size the trade. Enter the number of shares, or an amount to invest. With an amount, the calculator divides it by the entry price and, if you keep “Whole shares only” ticked, rounds down to whole shares.
  3. Enter the entry and exit prices. Use your average fill prices. For a planned trade, type a target price or a percentage change instead.
  4. Add fees and dividends. Enter your broker’s commission per trade, if any. Leave the SEC fee on for US stock sales. Switch the FINRA TAF on if your broker passes it through. Add dividends received while you held the shares.
  5. Add dates for the holding period. With both trade dates, the calculator shows the days held, whether a gain would be short-term or long-term under the IRS one-year rule, and the annualized return.
  6. Optionally estimate tax. Enter your own short-term and long-term rates. The after-tax result is an estimate for a single trade, not a tax return.

Stock profit formulas

Shares (amount mode) = amount ÷ entry price (rounded down if whole shares only) Gross profit, long = (sell price − buy price) × shares Gross profit, short = (short-sale price − cover price) × shares Commission per trade = flat fee + % × trade value (charged on entry and exit) SEC Section 31 fee = rate per $1M × sale value ÷ 1,000,000 FINRA TAF = min(shares sold × rate, cap per trade) Net profit = gross − all fees + dividends received (long) − dividends paid (short) Return = net profit ÷ (entry value + entry-side costs) Annualized (CAGR) = (1 + return)^(365 ÷ days held) − 1 Break-even exit price = exit price where net profit = 0 Exit for target T = exit price where net profit = T After-tax profit = net − max(0, gross − fees) × tax rate − dividends × dividend rate

The return uses the money that went into the entry: the shares at the entry price plus the entry-side costs. For a short sale this is the value of the shares sold short. Margin, borrow fees and interest are not included.

Fees on a stock sale: SEC Section 31 and FINRA TAF

Many US brokers no longer charge a commission on online stock trades, but two small regulatory fees can still appear on the sale side of a trade.

SaleSEC fee at $20.60 per millionTAF at $0.000195 per share, max $9.79
100 shares × $62.50 = $6,250.00$0.1288$0.0195
1,000 shares × $200.00 = $200,000.00$4.1200$0.1950
10,000 shares × $45.00 = $450,000.00$9.2700$1.9500
60,000 shares × $12.00 = $720,000.00$14.8320$9.7900 (cap)

Computed with the calculator’s formulas, before any rounding by the broker. Brokers may round each fee to the cent and may show it on the trade confirmation under a different name.

Holding period: short-term or long-term

The IRS rule is simple. Tax Topic 409 says: “Generally, if you hold the asset for more than one year before you dispose of it, your capital gain or loss is long-term.” It adds that “Net short-term capital gains are subject to taxation as ordinary income at graduated tax rates.”

IRS Publication 550 explains how to count the days: “To determine how long you held the investment property, begin counting on the date after the day you acquired the property. The day you disposed of the property is part of your holding period.” For listed stocks, the holding period “begins the day after the trade date you bought the securities, and ends on the trade date you sold them”, so use trade dates, not settlement dates. The publication’s example: property bought on 31 January 2024 and sold on 29 January 2025 is short-term; sold on 6 February 2025 it is long-term.

The calculator marks a gain as long-term when the sell date is after the one-year anniversary of the buy date, and shows the first long-term date. For a purchase on 29 February it treats 1 March of the next year as the anniversary, the later of the two possible readings.

Short sales. Publication 550 says the holding period of a short sale depends on “the amount of time you actually hold the property that’s eventually delivered to the lender to close the short sale.” In its example a short sale closed after 13 months with newly bought shares gives a short-term loss, “because your holding period for the delivered property is less than 1 day.” The calculator therefore treats every short sale as short-term. Special rules apply if you already held the same stock.

Annualized return (CAGR)

A 25% gain over two years and a 25% gain over two months are very different results. The annualized return, or compound annual growth rate, puts them on the same scale: (1 + return)365 ÷ days − 1. Dividends are counted in the return but not reinvested. For holding periods of a few weeks the annualized number assumes the same result repeats all year, so it can look extreme; read it as a comparison figure, not as an expected yearly return.

Worked examples

All three trades are hypothetical. Prices, fees and tax rates are chosen for the arithmetic and are not market data or tax advice.

1. Long position held more than a year (the default)

Buy 100 shares at $50.00 on 10 March 2025, receive $24.00 in dividends, sell at $62.50 on 12 November 2026. No commission. SEC fee on; TAF off because of the pause. Tax rates of 24% short-term, 15% long-term and 15% on dividends are examples only.

StepArithmeticResult
Gross profit(62.50 − 50.00) × 100$1,250.00
SEC fee20.60 × 6,250 ÷ 1,000,000$0.1288
Net profit1,250.00 − 0.1288 + 24.00$1,273.87
Return1273.87 ÷ 5,000.0025.48%
Holding period10 Mar 2025 → 12 Nov 2026612 days, long-term (from 11 Mar 2026)
Annualized (CAGR)(1 + 0.25477)^(365 ÷ 612) − 114.49%
Break-even sell priceprice where net profit = 0$49.76
Sell price for $1,000 netprice where net profit = 1,000$59.76
Estimated tax1249.87 × 15% + 24.00 × 15%$191.08
After-tax profit1273.87 − 191.08$1,082.79 (21.66%)

The dividends lower the break-even price below the buy price: the shares could be sold slightly below $50.00 and the trade would still not lose money.

2. Short sale that loses money

Sell short 200 shares at $80.00 on 20 April 2026, pay $44.00 in lieu of a dividend, buy to cover at $88.00 on 14 August 2026. Commission $4.95 per trade; SEC fee and TAF both on (the TAF was charged at $0.000195 a share before the pause).

StepArithmeticResult
Gross loss(80.00 − 88.00) × 200−$1,600.00
Commissions4.95 × 2$9.90
SEC fee on the short sale20.60 × 16,000 ÷ 1,000,000$0.3296
FINRA TAF200 × 0.000195$0.0390
Dividend paid to the lender−$44.00
Net loss−1,600.00 − 10.2686 − 44.00−$1,654.27
Return-1654.27 ÷ 16,005.32−10.34%
Break-even cover priceprice where net profit = 0$79.73
Holding period20 Apr → 14 Aug 2026116 days, short-term
Taxloss, no tax$0.00

On a short position every cost pushes the break-even cover price below the short-sale price. The stock has to fall about 0.34% before the trade starts to make money.

3. Invest an amount, exit at +12%, sold within a year

Invest $10,000 at $37.40 on 5 January 2026 with whole shares only, sell after a 12% rise on 28 September 2026. Commission 0.1% of each trade; SEC fee and TAF on. Short-term tax rate 22% (example).

StepArithmeticResult
Shares10,000 ÷ 37.40 = 267.38, rounded down267 (cash left $14.20)
Exit price37.40 × 1.12$41.8880
Gross profit(41.888 − 37.40) × 267$1,198.30
Commissions0.1% × (9,985.80 + 11,184.10)$21.17
SEC fee + TAF20.60 × 11,184.10 ÷ 1M + 267 × 0.000195$0.2825
Net profit$1,176.84
Return1176.84 ÷ 9,995.7911.77%
Holding period5 Jan → 28 Sep 2026266 days, short-term
Annualized (CAGR)(1 + 0.11773)^(365 ÷ 266) − 116.50%
After-tax profit1176.84 − 1176.84 × 22%$917.94 (9.18%)

A 12% price rise becomes a smaller net return because both commissions come out of the gain, and the short-term rate applies because the shares were held for less than a year. A sale on or after 6 January 2027 would have made the gain long-term.

Common mistakes

Limits of this calculator

FAQ

How do you calculate profit on a stock?

Multiply the number of shares by the difference between the sell price and the buy price, then subtract commissions and fees on both trades and add any dividends received. For example, 100 shares bought at $50.00 and sold at $62.50 make a gross profit of $1,250.00; with a $0.13 SEC fee and $24.00 of dividends the net profit is $1,273.87.

How do you calculate the percentage return on a stock?

Divide the net profit by the amount you put in, then multiply by 100. In the example above, $1,273.87 ÷ $5,000.00 = 25.48%. To compare trades of different lengths, annualize it: (1 + return)^(365 ÷ days held) − 1. Held for 612 days, 25.48% is about 14.49% a year.

How long do you have to hold a stock for long-term capital gains?

More than one year. IRS Topic 409 says that if you hold an asset for more than one year before you dispose of it, the gain or loss is long-term. Publication 550 says to start counting on the day after the trade date of the purchase and to include the trade date of the sale, so a stock bought on 10 March 2025 becomes long-term if sold on 11 March 2026 or later.

What is the SEC fee on a stock sale?

It is the Section 31 transaction fee on sales of securities. From 4 April 2026 the SEC rate is $20.60 per million dollars of sales, so selling $6,250 of stock costs about $0.13. Brokers generally pass it to customers on the sale side only; purchases are not charged.

How do you calculate profit on a short sale?

Subtract the buy-to-cover price from the short-sale price and multiply by the number of shares, then subtract commissions, fees and any payments in lieu of dividends. Shorting 200 shares at $80.00 and covering at $88.00 loses $1,600.00 before costs. Because the price can keep rising, the possible loss on a short sale has no fixed limit.

Do dividends count as part of stock profit?

Yes, for total return. Cash dividends received while you hold the shares add to your profit even though they are taxed separately from the capital gain. Price-only calculators leave them out, which understates the return of dividend-paying stocks.

Related tools

Sources

  1. U.S. Securities and Exchange Commission, Fee Rate Advisory #2 for Fiscal Year 2026 (Section 31 rate of $20.60 per million from 4 April 2026), 27 February 2026.
  2. U.S. Securities and Exchange Commission, “Section 31 Transaction Fees: Basic Information for Firms”.
  3. FINRA, SR-FINRA-2024-019 fee adjustment schedule (TAF rate and per-trade maximum by year).
  4. FINRA, SR-FINRA-2026-021 (PDF), temporary TAF pause from 1 October to 31 December 2026.
  5. FINRA, By-Laws, Schedule A, Section 1 — Member Regulatory Fees.
  6. Internal Revenue Service, Topic no. 409, Capital gains and losses.
  7. Internal Revenue Service, Publication 550 (2025), Investment Income and Expenses, chapter 4: Holding Period and Short Sales.

Web sources retrieved 14 Nov 2026.

Educational tool only, not financial, investment or tax advice. Results depend on the numbers you enter and the formulas above. They do not predict future prices and are no promise of profit; stock prices can fall, and a short position can lose more than the amount received from the short sale. Tax results are rough estimates; check your situation with a qualified tax professional. All example numbers are hypothetical.