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.
Inputs Example values A hypothetical trade. Replace them with your own; use a dot for decimals.
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
| Price move | Exit price | Net profit or loss | Return |
|---|
Everything runs in your browser. Nothing you type is saved or sent.
How to use the stock profit calculator
- Choose long or short. Long means you buy first and sell later. Short means you sell borrowed shares first and buy them back later.
- 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.
- Enter the entry and exit prices. Use your average fill prices. For a planned trade, type a target price or a percentage change instead.
- 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.
- 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.
- 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
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.
- SEC Section 31 fee. Exchanges and FINRA pay this fee to the SEC on “covered sales” of securities. The SEC explains that “Broker-dealers, in turn, generally charge their customers per-transaction charges.” In its fee rate advisory of 27 February 2026, the SEC set the rate at $20.60 per million dollars of sales for charge dates on or after 4 April 2026. The rate had been $0.00 per million through 3 April 2026. The calculator applies it to the sale: the exit for a long position and the short sale itself for a short position.
- FINRA trading activity fee (TAF). FINRA charges its member firms a fee per share sold. The fee schedule set the 2026 rate at $0.000195 per share for each sale of a covered equity security, with a maximum of $9.79 per trade. In September 2026 FINRA filed to “temporarily pause TAF revenue collection for transactions from October 1, 2026 through December 31, 2026”, setting the rate to $0.00 for that period. The filing says the pause is “designed to address surplus TAF revenues for 2026”, and it restores the $0.000195 rate from 1 January 2027. The TAF box is therefore off by default; switch it on for trades outside the pause, if your broker passes it on.
| Sale | SEC fee at $20.60 per million | TAF 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.
| Step | Arithmetic | Result |
|---|---|---|
| Gross profit | (62.50 − 50.00) × 100 | $1,250.00 |
| SEC fee | 20.60 × 6,250 ÷ 1,000,000 | $0.1288 |
| Net profit | 1,250.00 − 0.1288 + 24.00 | $1,273.87 |
| Return | 1273.87 ÷ 5,000.00 | 25.48% |
| Holding period | 10 Mar 2025 → 12 Nov 2026 | 612 days, long-term (from 11 Mar 2026) |
| Annualized (CAGR) | (1 + 0.25477)^(365 ÷ 612) − 1 | 14.49% |
| Break-even sell price | price where net profit = 0 | $49.76 |
| Sell price for $1,000 net | price where net profit = 1,000 | $59.76 |
| Estimated tax | 1249.87 × 15% + 24.00 × 15% | $191.08 |
| After-tax profit | 1273.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).
| Step | Arithmetic | Result |
|---|---|---|
| Gross loss | (80.00 − 88.00) × 200 | −$1,600.00 |
| Commissions | 4.95 × 2 | $9.90 |
| SEC fee on the short sale | 20.60 × 16,000 ÷ 1,000,000 | $0.3296 |
| FINRA TAF | 200 × 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 price | price where net profit = 0 | $79.73 |
| Holding period | 20 Apr → 14 Aug 2026 | 116 days, short-term |
| Tax | loss, 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).
| Step | Arithmetic | Result |
|---|---|---|
| Shares | 10,000 ÷ 37.40 = 267.38, rounded down | 267 (cash left $14.20) |
| Exit price | 37.40 × 1.12 | $41.8880 |
| Gross profit | (41.888 − 37.40) × 267 | $1,198.30 |
| Commissions | 0.1% × (9,985.80 + 11,184.10) | $21.17 |
| SEC fee + TAF | 20.60 × 11,184.10 ÷ 1M + 267 × 0.000195 | $0.2825 |
| Net profit | $1,176.84 | |
| Return | 1176.84 ÷ 9,995.79 | 11.77% |
| Holding period | 5 Jan → 28 Sep 2026 | 266 days, short-term |
| Annualized (CAGR) | (1 + 0.11773)^(365 ÷ 266) − 1 | 16.50% |
| After-tax profit | 1176.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
- Leaving out fees. Commissions are charged on both the buy and the sell. A $4.95 commission each way on a $1,000 trade costs about 1% before the price moves at all.
- Using the settlement date. Holding periods use trade dates. Selling one day too early can turn a long-term gain into a short-term one.
- Comparing returns without time. A total return says nothing about how long the money was tied up. Add both dates to see the annualized return.
- Forgetting dividends. Dividends received are part of a long position’s profit. On a short position, payments in lieu of dividends are a cost.
- Several buys at different prices. This calculator handles one entry price. Use the average cost of your lots, or work it out first with the stock average calculator.
Limits of this calculator
- One position, one entry price and one exit price. Partial sales and specific-lot selection are not modelled.
- No margin interest, short borrow fees, currency conversion, spreads or slippage.
- The tax estimate applies one flat rate to the gain. It ignores tax brackets, the net investment income tax, state tax, loss carryovers and the wash sale rule. A loss is shown as untaxed; its value against other gains is not counted.
- Fee rates change. The SEC and FINRA rates above were checked on 14 November 2026; edit the rate fields if they change.
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
- Stock average calculator
Average cost of several buys at different prices. - CAGR calculator
Compound annual growth rate between two values. - Dividend calculator
Dividend income and reinvestment over time. - Position size calculator
How many shares to buy for a fixed risk per trade. - Risk reward calculator
Reward-to-risk ratio of a planned trade. - ROI calculator
Return on investment for any amount and period.
Sources
- 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.
- U.S. Securities and Exchange Commission, “Section 31 Transaction Fees: Basic Information for Firms”.
- FINRA, SR-FINRA-2024-019 fee adjustment schedule (TAF rate and per-trade maximum by year).
- FINRA, SR-FINRA-2026-021 (PDF), temporary TAF pause from 1 October to 31 December 2026.
- FINRA, By-Laws, Schedule A, Section 1 — Member Regulatory Fees.
- Internal Revenue Service, Topic no. 409, Capital gains and losses.
- 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.