CalcFees
Cost Basis · LTCG · STCG · Net Return

Stock Profit Calculator

Find what a trade actually returns after commissions and capital gains tax. The 2026 LTCG brackets (0/15/20%) auto-apply from your filing status and income; short-term gains use your ordinary federal rate. State tax optional.

Trade

Holding period

Tax (optional — leave defaults to skip)

Cost basis $5,000.00
Gross proceeds $7,500.00
Capital gain $2,500.00
Pre-tax return 50.00%
Federal tax (15%) $375.00
State tax (0%) $0.00
Total tax $375.00
Break-even sell price $50.00/sh
Net profit (after tax) $2,125.00
Net return on cost 42.50%

How Stock Profit Math Actually Works

Three numbers move the after-tax return on a stock trade and only one of them is the price difference. Cost basis is the buy price times shares plus the buy commission, sale proceeds is the sell price times shares minus the sell commission, and the gap between them is the capital gain — which then gets taxed at one of two completely different rate structures depending on how long the position was held. The IRS draws the line at exactly one year and one day per Topic 409: hold longer and the gain qualifies for long-term capital gains rates of 0%, 15%, or 20%; sell sooner and it lands in your ordinary-income bracket alongside your wages. For a 22% bracket trader, that single-day distinction is the difference between keeping 78 cents of every dollar gained and keeping 85.

Long-Term Capital Gains Brackets for 2026

Per IRS Revenue Procedure 2025-32 (summarized by the Tax Foundation), the 2026 long-term capital gains brackets are 0% on taxable income up to $49,450 single ($98,900 married filing jointly, $66,200 head of household), 15% from there up to $545,500 single ($613,700 MFJ, $579,600 HOH), and 20% above those caps. The brackets shifted up about 2.7% from 2025 for inflation but the rate structure has been unchanged since the Tax Cuts and Jobs Act took effect in 2018. The 0% bracket is genuinely 0% federal on long-term gains for anyone whose taxable income (including the realized gain) stays under the threshold — which is more retail investors than typically realize, especially in retirement years before required minimum distributions kick in. The Net Investment Income Tax adds another 3.8% on top of these rates for high earners over $200,000 single / $250,000 MFJ; the calculator does not model NIIT but it stacks on the federal LTCG number.

Short-Term Gains and Why They Hurt

Short-term capital gains — anything held one year or less — get taxed as ordinary income, which means the marginal federal rate runs 10/12/22/24/32/35/37% depending on bracket. For a single filer earning $80,000 of taxable income in 2026, the marginal ordinary rate is 22%, while the long-term rate on the same gain would be 15%. That seven-point gap on a $5,000 short-term gain is $350 of tax avoidable just by waiting out the holding period. The math gets more pronounced at higher brackets: a 32% ordinary rate flipped to a 15% LTCG rate keeps 17 cents on every gain dollar. State tax compounds the problem in California, New York, and other high-tax states because most states tax capital gains as ordinary income with no preferential rate — California specifically pulls 9.3% off the top regardless of holding period. The calculator surfaces both scenarios when the holding toggle flips, alongside the profit margin calculator for the underlying business case and the depreciation calculator for tax-deferred equipment plays that work the opposite direction of front-loading deductions.

Primary sources verified April 2026:

Frequently Asked Questions

How do I calculate stock profit?

Most retail traders eyeball the share price difference and call it a day, which is exactly why the brokerage statement at year-end never matches what they thought they made. The right number is sale proceeds minus cost basis, where cost basis includes the buy commission and proceeds means sell price minus the sell commission — and on a taxable account you then subtract federal capital gains tax (state too if your state taxes investment income). The calculator runs all four steps so the gap between the headline gain and the after-tax number is visible before you place the trade. The reason this matters is that a 30% headline return on a short-term hold can land closer to 18% after a 22% federal bracket plus a typical state — and short-term gains are taxed at ordinary income rates, not the gentler 0/15/20% long-term brackets.

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

The line is one year and one day, and the tax difference is large enough that planning around it has built entire wealth-management strategies. Sell a stock you held for 365 days or fewer and the gain hits your federal tax return at the same rate as your wages — 10/12/22/24/32/35/37% depending on your bracket. Hold the same stock one day longer and the gain shifts to long-term capital gains rates: 0%, 15%, or 20% based on taxable income and filing status. For a single filer with $80,000 of taxable income in 2026, that flip moves the rate from 22% (ordinary) to 15% (LTCG) — a 7-point swing, which on a $10,000 gain is $700 left in your account instead of the IRS's. The calculator's holding-period toggle reflects this directly so you can see what waiting another month is actually worth.

What are the 2026 long-term capital gains tax rates?

Most retail investors look at long-term capital gains and assume the brackets work like ordinary tax brackets where the bigger your income, the bigger your bite — and they do not. A married couple sitting at $90,000 of taxable income in 2026 can sell stock for a $5,000 long-term gain and pay $0 federal tax on it, because the gain stacks onto income and only the slice crossing $98,900 starts getting taxed at 15%. The 2026 numbers (per IRS Rev Proc 2025-32 via the Tax Foundation): single filers hit the 15% LTCG bracket at $49,450 and the 20% bracket at $545,500; married filing jointly the breakpoints sit at $98,900 and $613,700; head of household at $66,200 and $579,600. Inflation pushed every threshold up roughly 2.7% from 2025 but the rate structure itself is unchanged. The 0% bracket is the part most retail investors leave on the table because they never run their actual taxable income against the threshold before realizing.

How do I figure out cost basis?

Cost basis is the price you paid for the shares plus the buy commission, full stop — but the way most retail brokers report it on the 1099-B is where the confusion starts. Robinhood and Fidelity both default to FIFO (first-in-first-out), which means selling 100 shares from a position you built across multiple purchases assigns the cost basis from your earliest buys. Specific identification — telling the broker exactly which lot to sell — almost always produces a better tax outcome but requires you to flag it before the sale settles. For employer stock from RSUs or ESPPs the cost basis includes the income already taxed at vest, which trips up enough people that the IRS warns about double-taxation in the Form 8949 instructions. The calculator assumes a single buy lot at the price you enter; for multi-lot positions, run it once per lot or pull the broker's realized gain/loss report.

Do I owe taxes on a stock loss?

Most traders chasing a loss harvest at year-end forget that the IRS has a 30-day fence around the trade — and that is where the wash-sale rule turns a tax-loss strategy into a tax bill that shows up the year after. Capital losses normally offset capital gains dollar-for-dollar, with any leftover loss reducing ordinary income by up to $3,000 per year. But sell at a loss and buy the same security or a "substantially identical" one within 30 days before or after the sale, and the loss is disallowed under IRS Publication 550. The disallowed amount rolls into the basis of the replacement shares — not gone forever, just deferred until those shares are sold. Apple to Microsoft is fine; Apple to Apple in any 60-day window is not. The calculator shows the negative gain when sale price drops below basis but does not apply tax to losses, and the wash-sale check is the trader's job.

Should I sell now or wait for long-term rates?

The break-even math is straightforward and the calculator makes it visible: if your short-term tax rate is 22% and long-term rate is 15%, holding for the long-term qualification keeps an extra 7% of the gain. On a $10,000 gain that is $700 — but the question is whether the stock is worth holding for the additional weeks or months independent of taxes. The honest answer for most retail positions is that tax-tail-wagging-the-investment-dog is how people end up holding losers all the way down trying to qualify for LTCG. The calculator shows both scenarios side by side when you flip the holding-period toggle, so the comparison is concrete. The other consideration the toggle does not capture: if you have offsetting capital losses elsewhere in the portfolio, short-term gains can be wiped out by short-term losses with no rate penalty.