Stock Capital Gains Tax Calculator & Lot Sale Planner
Compare two stock sale plans in the same U.S. federal tax year. Enter the trade dates, adjusted dollar basis, proceeds and sale fees for the lots you would sell. The calculator distinguishes short- and long-term gains, combines them with existing gains or losses and qualified dividends, and shows how the sale changes estimated regular federal tax. See what each plan puts in the 0%, 15% and 20% preferential bands, then inspect differences in spendable proceeds and the tax effect of another $1,000 in eligible long-term gain.
Compare stock lots before selling
See how trade dates, purchase basis, loss offsets and preferential rates change your sale cash.
Tax year and existing income
Update both sale dates to use a different year.
Proposed trades
Edit sale dates and lots
Enter totals for the units you would sell. Use trade dates and confirmed adjusted basis. Keep tax adjustments at zero unless your records supply an amount.
Plan A
Plan B
After-tax cash by sale plan
Plan B leaves $687.50 more after modeled tax.
Regular federal tax before the proposed sales is $5,152.00 under the entered assumptions.
Plan A
- Net sale proceeds
- $18,000.00
- Regular federal tax
- $6,372.00
- Unused taxable space at 0%
- $0.00
- Tax change on another $1,000 eligible long-term gain
- $150.00
The extra-gain check reapplies gain and loss netting. Unused space in the 0% band measures taxable income.
Plan B
- Net sale proceeds
- $18,000.00
- Regular federal tax
- $5,684.50
- Unused taxable space at 0%
- $0.00
- Tax change on another $1,000 eligible long-term gain
- $150.00
The extra-gain check reapplies gain and loss netting. Unused space in the 0% band measures taxable income.
Where the taxable income lands
For 2026 and this filing status, the preferential 0% band ends at $49,450.00 and the 15% band ends at $545,500.00.
Before sales
- Ordinary income
- $45,000.00
- Preferential at 0%
- $0.00
- Preferential at 15%
- $0.00
- Preferential at 20%
- $0.00
Plan A
- Ordinary income
- $53,000.00
- Preferential at 0%
- $0.00
- Preferential at 15%
- $0.00
- Preferential at 20%
- $0.00
Plan B
- Ordinary income
- $45,000.00
- Preferential at 0%
- $4,450.00
- Preferential at 15%
- $3,550.00
- Preferential at 20%
- $0.00
The bands show the preferential worksheet allocation. The regular estimate uses the lower of that calculation and all-ordinary tax.
Trade dates and gain ledger
Open sale lot ledger
| Lot | Acquisition | Sale | First long-term date | Term | Basis | Gross proceeds | Fees | Tax adjustment | Net proceeds | Taxable gain or loss |
|---|---|---|---|---|---|---|---|---|---|---|
| Plan A · Lot 1 | 2025-10-15 | 2026-10-15 | 2026-10-16 | Short term | $10,000.00 | $18,000.00 | $0.00 | $0.00 | $18,000.00 | $8,000.00 |
| Plan B · Lot 1 | 2025-10-14 | 2026-10-15 | 2026-10-15 | Long term | $10,000.00 | $18,000.00 | $0.00 | $0.00 | $18,000.00 | $8,000.00 |
Open tax calculation ledger
| Tax estimate | Before sales | Plan A | Plan B |
|---|---|---|---|
| Net short-term before cross-netting (USD) | $0.00 | $8,000.00 | $0.00 |
| Net long-term before cross-netting (USD) | $0.00 | $0.00 | $8,000.00 |
| Net short-term gain after netting (USD) | $0.00 | $8,000.00 | $0.00 |
| Net long-term gain after netting (USD) | $0.00 | $0.00 | $8,000.00 |
| Current-year deduction under the limit (USD) | $0.00 | $0.00 | $0.00 |
| Loss above the deduction limit (USD) | $0.00 | $0.00 | $0.00 |
| Total taxable income (USD) | $45,000.00 | $53,000.00 | $53,000.00 |
| Regular federal tax (USD) | $5,152.00 | $6,372.00 | $5,684.50 |
| Unused taxable space in the 0% band (USD) | $4,450.00 | $0.00 | $0.00 |
| Preferential worksheet tax (USD) | $5,152.00 | $6,372.00 | $5,684.50 |
| All-ordinary tax (USD) | $5,152.00 | $6,372.00 | $6,372.00 |
How to use this calculator
- Choose 2026 or 2027 and your filing status. Enter ordinary income after deductions, before the entered investment amounts. Use a negative ordinary amount for unused deductions.
- Enter your other qualified dividends and confirmed net short- and long-term gains or losses, excluding every lot proposed in these plans.
- Open Edit sale dates and lots. Give each plan a sale trade date and enter each purchased lot’s acquisition date, adjusted basis, gross proceeds and selling fees. An empty plan models no sale.
- Keep the confirmed tax adjustment at zero unless you have a specific signed reporting adjustment. A positive adjustment increases the modeled gain or reduces a modeled loss without changing your proceeds.
- Compare after-tax cash, the holding-period dates and the tax bands. Download the ledger to retain the full comparison and input amounts.
The Formula
The mathematical logic powering this calculation is:
A stock sale’s cash proceeds equal gross sale proceeds minus selling fees. Modeled gain or loss equals those proceeds minus adjusted basis plus the signed, confirmed tax adjustment. Choose plain investment lots with confirmed holding periods. For a regular purchase on an established market, use trade dates. The first long-term date is the day after the one-year calendar anniversary of purchase. Use the last day of February if the anniversary year has no February 29.
Add each lot’s result to the applicable short- or long-term total. When they have opposite signs, the loss reduces the other term’s gain. If there is a net capital loss, the current-year deduction is the lesser of that loss and $3,000, or $1,500 if married filing separately. The worksheet reports excess loss above that deduction limit and does not estimate next-year carryover.
Total taxable income is ordinary income after deductions, plus residual net short-term gain, residual net long-term gain and qualified dividends, minus the capped net capital loss deduction. Taxable income floors at zero. Net long-term gain plus qualified dividends is preferential, limited to total taxable income. Ordinary taxable income uses the lower dollars first. The preferential amount then fills the remaining 0% band, then the 15% band and then the 20% band, based on the selected year and filing status. Also calculate tax on total taxable income at ordinary rates and use the lower total, consistent with the IRS estimation worksheet.
Tax is calculated with the marginal rate schedules and rounded to cents after summing. The regular federal tax change is the difference between rounded tax with and without the sale lots. After-tax proceeds subtract that change from sale cash. A negative change represents reduced modeled tax and can leave after-tax proceeds greater than sale cash alone. The extra-$1,000 measure adds qualifying long-term gain to the plan and applies the same netting and thresholds again. Reported unused space in the 0% band is a taxable-income measure. Loss offsets can reduce a deduction before any new gain enters that band.
For 2026 and 2027 U.S. individual federal regular income tax, enter USD amounts with cent precision, up to $10 million per input. Sale dates must fall in the selected tax year; acquisition dates are supported from 1900 onward. Enter lot totals, including any allocation of a partial lot’s adjusted basis. The worksheet omits state tax, 3.8% net investment income tax, AMT, extraordinary capital gain rates, estimated payment penalties, and changes to eligibility, deductions or credits. Schedule-based estimates can differ from a return using the IRS Tax Table and whole-dollar rounding.Worked Example
If you input:
- Tax year and filing status: 2026, Single
- Ordinary income after deductions: $45,000
- Qualified dividends and existing gains/losses: $0
- Plan A: Buy Oct 15, 2025, sell Oct 15, 2026. $10,000 basis, $18,000 gross proceeds, no fee or adjustment.
- Plan B: Buy Oct 14, 2025, sell Oct 15, 2026. $10,000 basis, $18,000 gross proceeds, no fee or adjustment.
Result:
Each lot generates $8,000 in gain. Plan A’s short-term amount uses $5,400 at 12% and $2,600 at 22%, adding $1,220.00 of regular federal tax. Plan B has $4,450 at 0% and $3,550 at 15%, adding $532.50. Plan B leaves $17,467.50 after the modeled tax, or $687.50 more than Plan A.
Frequently Asked Questions
Does the purchase or settlement date determine whether a stock sale is long term?
Enter purchase and sale trade dates for stock traded on an established market. The holding period starts the day after the purchase trade date and includes the sale trade date. Selling on the one-year anniversary is still short term for a regular lot.
Do my other investments affect the modeled sale tax?
Yes. Short- and long-term gains and losses can offset each other, and qualified dividends share space in the preferential bands. Enter other amounts separately so each proposed plan uses the same baseline.
Why are some long-term gains estimated at 0%?
Total taxable income and filing status determine the thresholds. Ordinary taxable income fills the lower dollars first. Then eligible long-term gains and qualified dividends can fill any space left in the 0% range.
Why are the all-ordinary and preferential worksheet totals both shown?
The regular estimate uses the lower tax calculation, as in the IRS estimation worksheet. A narrow range near a threshold can produce a lower all-ordinary total even when some income is eligible for preferential treatment.
Can the calculator determine my wash sales or select specific lots at my broker?
The lot editor uses confirmed basis, holding periods and signed tax adjustments. Keep your broker’s identifiers and reporting records separately. The calculator does not infer disallowed losses, inherited holding periods, or which lots a broker will sell.
Is unused space in the 0% band the amount I can sell tax free?
It is the room between the selected 0% threshold and modeled taxable income. Extra gain can also offset losses and shrink an ordinary deduction. Use the extra-$1,000 line to see that effect under the entered assumptions.
Similar Calculators
Stock Average Cost & Additional-Buy Calculator
Calculate stock average cost across purchase lots and fees. Explore an additional-buy budget, minimum shares for a target average and buy-versus-cash price scenarios.
Dividend Calculator
Compare cash dividends with dividend reinvestment. Model fractional shares, new contributions, payout frequency and changing prices, with wealth charts and a payment ledger.
Roth IRA Conversion Calculator & 2026 Federal Tax Planner
Compare the 2026 federal tax from two Roth IRA conversion amounts. Estimate the Form 8606 taxable portion, remaining IRA basis, and room in a tax bracket.
Federal Estimated Tax Underpayment Calculator & Payment Planner
Compare two federal estimated-tax payment schedules for 2025 or 2026. Track unpaid installments, IRS rate periods, and a dated penalty estimate.
Alternative Minimum Tax Calculator & ISO Exercise Planner
Estimate ordinary federal alternative minimum tax for 2026 or 2027 and compare two ISO exercise sizes. Find the first share adding AMT and the shares your cash budget covers.
Qualified Dividend Holding Period & Tax Planner
Check the qualified dividend holding period, compare two sale dates and estimate 2026 or 2027 federal dividend tax and cash kept.
