Trading
Stock Profit Calculator
Your profit is the number of shares times the price difference, minus the fees on the buy and the sell. Buying 10 shares at $150 and selling at $180 earns $300 before tax. In a taxable account, held more than a year at the 15% long-term rate, $255 is left, a 17% return after tax. Sell within a year in the 22% bracket and you keep $234.
I buy 10 shares at $150.00 and sell at $180.00.
Your profit would be
That's 17% on what you paid, after 15% federal tax.
- Return
- 17%
- Federal tax
- $45.00 long-term rate
- Fees
- $0.00
The breakdown
From sale to profit
Assumptions
Fine-tune the numbers
Model calculation without guarantee, not investment or tax advice. Returns fluctuate, and past performance is not a reliable indicator of future results. As of December 1, 2026.
How the calculator works
- Profit before tax = shares × (sell price − buy price) − 2 × fee per trade, one fee for the buy and one for the sell. The default fee is $0.
- Taxable account (on by default): shares held more than a year are taxed at the long-term rate you pick, 0%, 15% or 20% (default 15%). Shares held a year or less are short-term and taxed at your ordinary bracket (default 22%).
- The optional net investment income tax adds 3.8 percentage points to either rate. With the taxable account off (401(k) or IRA), no tax is due on the sale.
- Tax is only applied to a positive profit. A loss is not taxed and is not offset against other gains. State taxes are not included.
- The return in percent is the profit after tax relative to what you paid for the shares, including the buying fee. Dividends are not included.
How to calculate a stock profit
Multiply the number of shares by the difference between your sell price and your buy price, then subtract the fees for both trades. With 10 shares bought at $150 and sold at $180, you invested $1,500 and got back $1,800. That is a $300 profit, or 20% before tax. Selling the same shares at $120 loses $300.
Long-term vs. short-term gains
How long you held the shares decides the federal rate. Same $300 profit:
| Situation | Tax | You keep | Return after tax |
|---|---|---|---|
| 401(k) or IRA | $0 | $300 | 20.0% |
| Long-term, 15% | $45 | $255 | 17.0% |
| Long-term, 15% + NIIT | $56.40 | $243.60 | 16.2% |
| Short-term, 22% bracket | $66 | $234 | 15.6% |
For 2027, long-term gains are taxed at 0% up to $51,050 of taxable income (single) or $102,100 (married filing jointly), at 15% up to $563,200 or $633,600, and at 20% above that. Short-term gains count as ordinary income, taxed at 10% to 37%. The 3.8% net investment income tax applies on top once modified adjusted gross income passes $200,000 (single) or $250,000 (married filing jointly). Those two thresholds are not adjusted for inflation.
Taxable account vs. 401(k) or IRA
Trades inside a 401(k) or IRA are not taxed when you sell, so holding periods do not matter there. Withdrawals from traditional accounts are taxed later as ordinary income, while qualified Roth withdrawals are tax-free. Turn the taxable account off to see the untaxed result.
Fees and practice
At $5 per trade, the example drops to $290 before tax and $246.50 after the 15% long-term rate. Your break-even sell price rises to $151. Tradelino is a free paper-trading simulator with €25,000 in virtual capital and real live prices, so you can test trades without real money. This is not tax advice.
Frequently asked questions
- How do I calculate profit on a stock?
- Multiply the number of shares by the sell price minus the buy price, then subtract any trading fees. For 10 shares bought at $150 and sold at $180 with no fees, that is $300 before tax.
- How much tax do I pay on stock profits?
- For 2027, gains on shares held more than a year are taxed at 0%, 15% or 20%, with the 15% rate starting above $51,050 of taxable income for single filers. Gains on shares held a year or less are taxed at your ordinary rate of 10% to 37%. High earners may owe the 3.8% net investment income tax on top, and state taxes can apply.
- When does a gain count as long-term?
- When you held the shares for more than one year. The holding period starts the day after you buy, so a stock bought on March 10 must be sold on March 11 of the next year or later.
- Are stock losses taxed?
- No. A loss is not taxed, and in the US you can usually use it to offset capital gains and up to $3,000 of ordinary income a year. This calculator does not include that offset.
Sources
Retrieved and checked on December 1, 2026.
More calculators
All calculatorsCAGR Calculator
Turn a start value, an end value and a time span into the average annual return.
Dividend Calculator
How much dividend income an investment could pay over time, after tax and with or without reinvesting.
Investment Calculator
What a monthly index fund investment could be worth after fund fees and, if you like, after capital gains tax.