Understanding short-term vs long-term rates, NIIT, crypto taxes, and tax-saving strategies
The distinction between short-term and long-term capital gains depends entirely on your holding period - how long you owned the asset before selling. Under IRC Section 1222, this classification determines your applicable tax rate and can result in dramatically different tax consequences.
Short-term capital gains apply to assets held for one year or less. These gains receive no preferential tax treatment and are taxed as ordinary income at your marginal tax rate. For 2024, this means short-term gains could be taxed at rates up to 37% for the highest earners, plus any applicable state income taxes and the Net Investment Income Tax.
Long-term capital gains apply to assets held for more than one year and receive preferential tax rates. For 2024, the long-term capital gains rates are:
The holding period begins the day after you acquire the asset (not the purchase date) and ends on the day you sell or exchange it. For example, if you purchase stock on January 15, 2024, you must hold it until at least January 16, 2025, for long-term treatment. Use our capital gains tax calculator to estimate your tax liability.
The Net Investment Income Tax (NIIT) under IRC Section 1411 is an additional 3.8% tax on investment income that affects higher-income taxpayers. Enacted as part of the Affordable Care Act, the NIIT applies to individuals, estates, and trusts with investment income above certain thresholds.
The NIIT applies when your modified adjusted gross income (MAGI) exceeds:
The tax is calculated on the lesser of your net investment income or the amount by which your MAGI exceeds the applicable threshold. Net investment income includes:
Importantly, NIIT does not apply to wages and self-employment income, distributions from qualified retirement plans (401(k), IRA), tax-exempt interest from municipal bonds, Social Security benefits, or income from businesses in which you materially participate.
For high-income investors, the NIIT effectively increases the top long-term capital gains rate from 20% to 23.8%, and the top short-term rate from 37% to 40.8%. NIIT is calculated on Form 8960 and reported on your tax return.
Cryptocurrency is treated as property (not currency) for federal tax purposes under IRS Notice 2014-21, meaning all general tax principles applicable to property transactions apply to crypto. This classification has significant implications for how crypto gains and losses are taxed.
When you sell, trade, or otherwise dispose of cryptocurrency, you realize a capital gain or loss calculated as the difference between your sale proceeds (fair market value received) and your cost basis (original purchase price plus any transaction fees). The tax rate depends on your holding period:
Taxable cryptocurrency events include:
Non-taxable events include:
Cryptocurrency losses can offset gains and up to $3,000 of ordinary income annually. Note that the wash sale rule technically doesn't apply to crypto (since it's not a security), though proposed legislation may change this.
Tax-loss harvesting is a strategic investment technique that involves selling securities at a loss to offset capital gains and reduce your overall tax liability. When executed properly, this strategy can defer taxes and convert short-term gains (taxed at higher ordinary income rates) into long-term gains (taxed at preferential rates).
How capital losses offset gains under IRC Section 1211:
The wash sale rule limitation: Under IRC Section 1091, you cannot claim a tax loss if you purchase "substantially identical" securities within 30 days before or after the sale. This 61-day window (30 days before, the sale date, and 30 days after) prevents investors from immediately repurchasing the same investment. Substantially identical generally means the same stock or very similar mutual funds/ETFs tracking the same index.
Effective tax-loss harvesting strategies:
California does not offer preferential tax rates for long-term capital gains. Unlike the federal tax system, which taxes long-term gains at reduced rates of 0%, 15%, or 20%, California taxes all capital gains - regardless of holding period - as ordinary income under California Revenue and Taxation Code Section 17041.
This means California capital gains are subject to the state's progressive income tax rates:
For high-income California residents with significant investment gains, the combined federal and state tax burden on long-term capital gains can be substantial:
California does allow capital losses to offset capital gains and provides a $3,000 annual deduction against ordinary income ($1,500 married filing separately), mirroring federal rules. Capital loss carryforwards are also permitted. Use our capital gains tax calculator to estimate combined federal and California taxes.
Under IRC Section 121, you can exclude up to $250,000 of capital gains ($500,000 for married couples filing jointly) from the sale of your primary residence, potentially eliminating your tax liability entirely. This is one of the most valuable tax benefits available to homeowners.
Qualification requirements:
The two-year ownership and use periods don't need to be consecutive or overlap. For example, you could rent a home for three years, then live in it for two years, and qualify for the exclusion.
Partial exclusions may be available if you fail to meet the full requirements due to:
The partial exclusion equals the full exclusion multiplied by the fraction of the two-year requirement you met.
Important considerations:
Cost basis is your investment's original value for tax purposes and is crucial for determining your gain or loss when you sell. Accurate basis calculation directly impacts your tax liability - understating basis means overpaying taxes; overstating basis is tax evasion.
Basis for purchased investments (IRC Section 1012):
Basis for inherited property (IRC Section 1014):
Basis for gifted property (IRC Section 1015):
Identifying which shares you sold:
Brokerages report cost basis to the IRS on Form 1099-B for securities purchased after 2011 (2012 for mutual funds, 2014 for fixed income). For older securities, you're responsible for maintaining basis records.
Qualified Opportunity Zones (QOZs) under IRC Section 1400Z, created by the Tax Cuts and Jobs Act of 2017, provide significant capital gains tax benefits for investments in designated low-income communities. There are over 8,700 designated QOZs across all 50 states and U.S. territories.
How QOZ investments work:
Tax benefits of QOZ investments:
Example: You sell stock for a $1 million gain and invest it in a QOF. You defer the $1 million gain until 2026, when you'll owe tax on it. If the QOF investment grows to $2 million over 10+ years, the additional $1 million of appreciation is completely tax-free when you sell after the 10-year holding period.
QOZ investments are particularly valuable for taxpayers with large one-time capital gains from business sales, real estate transactions, or concentrated stock positions who can commit to long holding periods.
Use our free calculator to estimate federal and California capital gains taxes on your investments.
Open Calculator