Short-term (ordinary income rates) vs long-term (0%, 15%, 20%). The 0% bracket for low-income years. Qualified dividends. Net investment income tax.
Selling a stock after 11 months instead of 13 months can cost a saver thousands of dollars in tax. That timing mistake often erases years of compound growth when gains are large.
Many investors meet a predictable failure. They trade without counting time windows, marginal tax brackets, or extra surcharges. A routine example shows the scale: sell 120,000 salary, and that 12,000. Hold one more month so the gain is long-term taxed at 15% and the bill falls to 4,500 on a single trade. Small mistakes repeat across years. That 11,000 in 10 years. That is real money eaten by timing errors.
What else goes wrong. People mix up tax types and miss the 0% long-term bracket that can eliminate tax on gains in low-income years. For example, if taxable income is low enough for the 0% long-term capital gains bracket - often under roughly 89,250 married filing jointly in a 2023 example - then a 0 federal tax. Missing that window can cost 200,000 single or 100,000 investment gain adds $3,800 to tax.
People also misclassify dividends. A 10,000 payout tax from 1,500 at 15%, saving $900 instantly.
IF an investor ignores holding-period rules AND ignores taxable-income thresholds, THEN decisions about trade timing may increase lifetime taxes by thousands BECAUSE ordinary rates can be roughly 10 to 37% while long-term capital gains rates are 0% to 20%, with additional 3.8% NIIT in some cases. The following sections translate those facts into formulas and a clear decision framework.
Start with the basic math. Capital gain equals sale proceeds minus cost basis minus selling costs. In formula form: . Holding period matters. If held for 12 months or less, it is a short-term capital gain taxed at ordinary marginal rates that range from 10% to 37% in current US brackets. If held for more than 12 months, it is a long-term capital gain taxed at 0%, 15%, or 20% depending on taxable income. For example, in a 2023 example the single-filer thresholds are 0% up to about 44,626 to 492,300. Married filing jointly roughly doubles those thresholds to 0% up to about 553,850.
Qualified dividends follow the same 0/15/20 schedule if they meet holding-period and issuer rules. If dividends are non-qualified, they are taxed as ordinary income. Use this formula for after-tax proceeds on a sale: where is the applicable tax rate on the gain. Example with numbers: 50,000, , . After-tax, short-term addition is 38,000; long-term addition is 42,500. Net difference is $4,500.
Add the NIIT where relevant. NIIT is 3.8% on the smaller of net investment income or MAGI above the threshold. Example: MAGI = 250,000, excess = 50,000, so NIIT applies to 380. NIIT is effectively added on top of the 0/15/20 rate, so combine taxes: on the NIIT portion, capped by the lesser rule.
Remember state taxes. State capital gains tax rates vary from 0% to about 13.3% in California. If a state tax of 5% applies to a 2,500 to the federal tax bill in economic cost. Also note special categories: collectibles can be taxed at up to 28% and depreciation recapture at up to 25%. These are exceptions to the 0/15/20 rule.
IF an investor expects ordinary income rates above 24% AND the holding period can be extended beyond 12 months, THEN waiting may lower the tax rate by roughly 9 percentage points to 15% BECAUSE long-term rates are lower for most middle-to-upper incomes. Compute savings using the formulas above to see precise dollar impacts.
Problem-first rule. Mistiming sales and ignoring thresholds creates repeated tax leakage. Use simple conditional rules that combine tax math, liquidity needs, and market risk. Each rule below includes clear numbers and trade-offs.
Rule 1 - Hold for long-term when leverage to timing is low. IF the expected short-term price movement is small relative to tax drag AND the holding period will exceed 12 months, THEN consider waiting because converting a short-term tax at 24% to a long-term tax at 15% saves 9 percentage points on the gain. Example trade-off: for a 4,500 now, which could compound at 5-7% into roughly 13,800 over 20 years.
Rule 2 - Use the 0% long-term bracket in low-income years. IF taxable income in a given year is low enough to fall below the 0% long-term threshold - for example roughly under 89,250 married filing jointly in a 2023 example - THEN realize long-term gains up to those thresholds because federal tax on those gains may be $0, producing immediate tax savings equal to the avoided 15% rate. The trade-off is possibly increasing income in future years when rates or thresholds might change.
Rule 3 - Consider NIIT and MAGI. IF MAGI exceeds 250,000 married filing jointly by more than $5,000 and investment income is significant, THEN expect an extra 3.8% on part or all of gains because NIIT applies to the lesser of net investment income and excess MAGI. The trade-off is that tax avoidance strategies that push MAGI below the thresholds may require deferring income or accelerating deductions, which can change retirement account opportunities.
Rule 4 - Use tax-advantaged accounts for frequent trading. IF short-term active trading is expected and after-tax performance matters, THEN trade inside tax-advantaged accounts like a 401(k) or Roth IRA because trades inside avoid immediate capital gains taxation; the trade-off is contribution limits of 30,000 depending on age and year, and possible taxes on withdrawal for pre-tax accounts.
Rule 5 - Harvest losses to offset gains. IF realized losses exist or can be created and not constrained by the wash sale rule, THEN use losses to offset realized gains because each $1,000 of losses offsets taxable gains at the marginal rate or at capital gains rate if offsetting long-term gains. The trade-off is maintaining desired asset allocation and incurring transaction costs.
Each decision requires plugging real numbers into and comparing net proceeds. IF the difference exceeds other costs like opportunity cost or trading fees, THEN execute the lower-tax strategy because dollars saved compound and increase future wealth.
This framework does not cover every special tax rule. It also has behavioral and market risks. List of key limitations and scenarios with numbers.
Limitation 1 - State taxes vary widely. Federal long-term rates may be 0% to 20%, but combined state taxes can add 0% to about 13.3% in a high-tax state like California. IF an investor lives in California and has a 15,000) plus state at 13.3% (28,300 or 28.3% because state rules apply on top of federal ones. The trade-off is different decisions in low-tax states.
Limitation 2 - Special categories change rates. Collectibles and certain small business dispositions face up to 28% or special recapture at up to 25%. IF selling collectibles worth 14,000 in tax at 28% because those assets fall under a different rate schedule. The framework above assuming 0/15/20 will understate tax significantly.
Limitation 3 - Wash sale and basis complexities. The wash sale rule disallows recognizing losses if substantially identical securities are bought within 30 days, which can stop immediate tax-loss harvesting. IF an investor tries to capture a 5,000 loss is disallowed and added to the new basis because of the wash sale rule. This changes the timing of tax benefits and must be tracked precisely.
Limitation 4 - Market timing risk and liquidity. Waiting more than 12 months to save, say, 9 percentage points on tax may expose the investor to a price decline of 10% or more. IF the position drops by 10% while waiting, THEN the tax saved on the original gain may be erased because the pre-tax loss reversed the gain. Behaviorally, some investors sell to rebalance or meet cash needs, which this tax-centered framework cannot justify by itself.
Limitation 5 - Law change risk. Thresholds and rates change; the 0/15/20 schedule and NIIT are subject to legislative change. IF Congress changes rates or thresholds next year, THEN past calculations may be invalid because tax parameters are not guaranteed. This framework should be used with current-year thresholds and reviewed annually.
These limitations mean the framework often needs adjustments for state tax rates, asset type, wash sale rules, liquidity needs, and the risk of future tax law changes. IF those conditions exist, THEN compute scenario-specific after-tax outcomes and compare them to the base-case trades.
Single filer with 50,000 of appreciated stock after 11 months or after 13 months. Marginal ordinary rate assumed 24%. Long-term capital gains rate assumed 15%. No NIIT or state tax.
Calculate short-term tax: 50,000 \times 0.24 = $12,000.
After-tax proceeds short-term: 12,000 = $38,000 added to basis return.
Calculate long-term tax: 50,000 \times 0.15 = $7,500.
After-tax proceeds long-term: 7,500 = $42,500.
Net difference: 38,000 = $4,500 saved by waiting one more month.
Insight: Waiting from 11 to 13 months on a 4,500 in federal tax under these assumptions; that 11,800 at 6% over 15 years, showing the compounded value of tax timing.
A married couple filing jointly expects taxable income of 30,000 of long-term appreciated stock and consider selling in that calendar year. Use 2023 long-term thresholds with 0% up to $89,250 for married filing jointly.
Determine taxable income before gains: 89,250 for married filing jointly in this 2023 example.
Allowed long-term gain at 0% equals the remaining threshold: 80,000 = $9,250 of gains may be taxed at 0%.
If they realize 9,250 is taxed at 0% and the remaining 20,750 \times 0.15 = $3,112.50.
Total federal tax on the 3,112.50 under these assumptions.
Insight: Filing in a low-income year allows up to 4,500 in tax under normal circumstances into 1,387.50 immediately.
Single filer has MAGI of 100,000 long-term capital gains. NIIT threshold is $200,000 single; NIIT rate is 3.8%. Long-term federal rate on gains assumed 15%.
Excess MAGI over threshold: 200,000 = $30,000.
NIIT applies to the smaller of net investment income (30,000). So NIIT base = $30,000.
NIIT amount = 1,140.
Long-term capital gains tax = 15,000. Combined federal tax = 1,140 = $16,140.
Insight: The 3.8% NIIT increased federal tax on the 1,140, raising the effective tax rate from 15% to about 16.14% for this taxpayer. Small percentage points can cost thousands on large gains.
Capital gains equal sale price minus cost basis minus selling costs: $\text{Gain} = \text{Sales Price} - \text{Cost Basis} - \text{Selling Costs}.
Holding period drives rate: short-term is <=12 months taxed at ordinary rates (10% to 37%), long-term is >12 months taxed at 0%, 15%, or 20%.
The 0% long-term bracket can eliminate federal tax on gains for taxable income below thresholds; example 2023 single roughly 89,250.
NIIT adds 3.8% on the lesser of net investment income or MAGI above 250,000 married filing jointly and should be included in combined tax math.
Qualified dividends receive long-term capital gains rates if holding and issuer rules are met; non-qualified dividends are taxed as ordinary income.
State taxes, collectibles (up to 28%), and depreciation recapture (up to 25%) can change effective tax rates materially and must be calculated separately.
Treating long-term status as automatic: many investors assume any multi-year position is long-term. This is wrong because the rule is strictly more than 12 months; selling at 365 days versus 366 days changes tax treatment.
Ignoring the NIIT: investors may calculate only 0/15/20 federal rates. That is wrong when MAGI exceeds 250,000 married filing jointly because a 3.8% surtax can apply and add thousands on large gains.
Forgetting state tax: computing only federal tax assumes state tax is zero. That is wrong in high-tax states where state rates of 5% to 13.3% can double the total tax cost on gains.
Misclassifying dividends: assuming all dividends are qualified is wrong; a 900 immediately if misclassified.
Easy: Single filer with 20,000 of stock held 14 months. Use 2023 thresholds with 0% up to $44,625 single. Calculate federal tax on the gain assuming long-term rate of 15% for income above 0% bracket.
Hint: Determine how much of the 0% bracket remains then tax the rest at 15%.
Taxable income before gain = 44,625 so none of the 60,000 is already above the threshold. Entire 20,000 \times 0.15 = $3,000.
Medium: Married filing jointly with 40,000 long-term gains in 2023. 0% bracket for married filing jointly is about 40,000 as short-term taxable at a marginal ordinary rate of 22%. Ignore NIIT and state taxes.
Hint: Compute available 0% space then split the gain between 0% and 15% portions, and compare to 22% ordinary taxation.
Taxable income before gains = 89,250 so remaining 0% capacity = 90,000 = -40,000 taxed at 15%: 6,000. If taxed short-term at 22%: 8,800. Difference = 6,000 = $2,800 saved by long-term treatment.
Hard: Single filer MAGI 150,000 long-term gains in 2023. Compute federal tax using 15% long-term rate, include NIIT 3.8% where applicable, and compute combined federal tax rate on the gain. Then compute after-tax proceeds. Assume 0/15/20 thresholds place these gains at 15% before considering NIIT.
Hint: Find excess MAGI over $200,000, apply NIIT to the lesser of excess and net investment income, then add long-term tax on entire gain.
Excess MAGI = 200,000 = 10,000) and net investment income (10,000. NIIT amount = 380. Long-term tax = 22,500. Combined federal tax = 380 = 150,000 gain = 150,000 = 15.2533% approx. After-tax proceeds = 22,880 = $127,120.
This lesson builds on Asset Classes (/money/asset-classes) because risk, expected returns, and liquidity determine whether delaying a sale makes sense. It also builds on Tax Brackets (/money/tax-brackets) since marginal and taxable income calculations determine capital gains rates. Understanding capital gains unlocks Tax-efficient Investing (/money/tax-efficient-investing) such as location of assets across taxable versus tax-advantaged accounts, and Retirement Withdrawal Strategies (/money/withdrawal-strategies) where sequencing withdrawals of taxable gains, qualified dividends, and pre-tax account distributions affects lifetime tax cost.