BLACK FRIDAY SALE  
70% OFF 
QuickBooks
for 3 months  Ends 11/30
QuickBooks Blog
A businessman calculating capital gains taxes
taxes

What is capital gain tax? Definition, hidden costs, and how to manage in 2025

Thinking about selling stocks, real estate, or crypto this year? If you make a profit, there’s a good chance you’ll owe capital gains tax. Let’s break down what capital gains tax is, how it works, the hidden costs most people miss, and smart ways to manage it.

Jump to:

Capital gains tax definition 

Capital gains tax is the tax you pay on the profit from selling a capital asset (e.g., stocks, real estate, or a business) when the selling price exceeds what you originally paid for it (i.e., cost basis). The profit you make is called a capital gain, and the government taxes this gain, not the full sale amount.

The tax applies only when the gain is “realized”—i.e., when the asset is actually sold. You don’t pay capital gains tax just because an asset's value has increased. Taxation only happens when you sell it for a gain.

Capital gains tax is part of your overall federal income tax, but it’s calculated separately from ordinary income like wages or business income. The rate you pay depends on how long you hold the asset, your total taxable income, and your filing status.

Capital gains rate in 2025

Here are the key updates to know for 2025, including federal tax bracket adjustments and notable changes at the state level that could impact your overall tax liability:

  • For tax year 2025, the federal long-term capital gains tax rates remain at 0%, 15%, and 20%, depending on your taxable income. However, the income thresholds for each rate have increased by approximately 2.8% to account for inflation.
  • Washington State raised its long-term capital gains tax from 7% to 9.9% on annual gains over $1 million. Gains below that threshold are still taxed at 7%.
  • Maryland introduced a new 2% surtax on net capital gains for individuals with federal AGI over $350,000. Some exceptions apply (like sales of primary homes under $1.5 million and certain retirement and business assets).
  • Louisiana repealed its net capital gains deduction for sales occurring on or after Jan. 1, 2025. Deals made with signed agreements before that date may still qualify.

What is a capital asset?

According to the IRS, a capital asset is "almost everything you own and use for personal, pleasure, and investment purposes." These assets can be personal items, investments, or property you use for work or business. If you sell one for more than you paid, you might owe capital gains tax on the profit.

Here are a few examples of capital assets:

  • Stocks and bonds: Shares in companies or mutual funds you invest in.
  • Real estate: Homes, rental properties, land, and buildings you own
  • Cryptocurrency: Digital assets like Bitcoin or Ethereum, if you’re holding them as an investment.
  • Collectibles: Art, antiques, rare coins, sports cards, or anything you collect that may go up in value.
  • Precious metals: Gold, silver, or other metals held as investments.
  • Business ownership: A stake in a business, like a partnership or LLC.

What’s not a capital asset? Inventory, accounts receivable, and depreciable business property used in trade or business are not considered capital assets.

Realized vs. unrealized gains

When you invest, the value of what you own can go up over time. But you only pay taxes on that growth when you sell. This is where the difference between realized and unrealized gains comes into play. Let’s break it down:

Unrealized gain 

An unrealized gain is the increase in value of an asset you still own. Let’s say you bought stock for $1,000, and now it’s worth $1,500. That $500 gain is unrealized because you haven’t sold it.

Unrealized gains are not taxable. They exist only on paper until you sell the asset.

Realized gain

A realized gain happens when you sell the asset for more than your original purchase price. Using the same example, if you sell the stock at $1,500, you now have a realized gain of $500.

Realized gains are taxable. This is when capital gains tax applies.

Short-term vs. long-term capital gains

Capital gains fall into two categories: short-term and long-term. The difference comes down to how long you held the asset before selling it, and this matters because the IRS taxes each one differently (see the section “Why the distinction matters for your taxes”).

The holding period rule

So, how does the IRS decide if your gain is short-term or long-term? It comes down to the holding period—i.e., how long you’ve held a particular asset.

  • Short-term: If you hold an asset for one year or less before selling, any profit is considered a short-term capital gain.
  • Long-Term: If you hold the asset for more than one year, the profit qualifies as a long-term capital gain.

The holding period begins the day after you acquire the asset and includes the day you sell it. For example, if you purchase stock on July 10, you must wait until July 11 the following year or later to meet the long-term holding requirement.

Why the distinction matters for your taxes

The distinction between short-term and long-term capital gains matters because it directly affects how much tax you pay when you sell investments.

Long-term capital gains are usually taxed at lower rates than short-term gains. That means if you hold an investment for more than a year before selling it, you’ll likely keep more of the profit in your pocket. On the other hand, short-term gains are taxed as ordinary income, which can lead to a higher tax bill.

How are capital gains taxed?

Capital gains tax rates depend on two main factors:

  1. How long you held the asset before selling (short-term vs. long-term)
  2. Your taxable income and filing status (single, married filing jointly, etc.)

Let’s break these rates down:

Short-term capital gains tax rates

Short-term capital gains (from assets held one year or less) are taxed just like regular income. That means they’re subject to the same tax brackets as wages, salaries, or business earnings.

Here are the 2025 federal income tax brackets that apply to short-term capital gains:

Long-term capital gains tax rates

If you hold an asset for more than one year, any gain you make when you sell it qualifies for long-term capital gains tax rates. These rates are much more favorable—0%, 15%, or 20%—depending on your income and filing status.

Here’s how the 2025 long-term capital gains rates break down:

So, if your income is under the 0% threshold, you could potentially pay no federal tax on long-term capital gains at all. Even if you fall into the 15% bracket, that’s still a big savings compared to your regular income tax rate.

Special capital gains rules and exceptions

There are several special situations where different rules apply. Knowing these exceptions can help you better plan your investment strategy and possibly save big on taxes. Here are some to consider:

Sale of primary residence exclusion

If you sell your main home, you may qualify to exclude up to $250,000 of capital gains from your taxable income if you're single, or up to $500,000 if you're married filing jointly. To qualify:

  • You must have owned and lived in the home for at least two of the last five years before the sale.
  • You haven’t claimed this exclusion for another home sale within the past two years.

This exclusion applies only to your primary residence, not rental or vacation homes.

Collectibles 

Capital gains on collectibles— e.g., art, antiques, stamps, coins, and vintage cars—don’t follow the usual long-term capital gains rates. Instead, they’re taxed at a maximum 28% rate, regardless of your income bracket.

This rule also applies to physical precious metals like gold or silver held outside of retirement accounts.

Qualified small business stock (QSBS)

If you invest in qualified small business stock (Section 1202 stock) and meet certain rules, you may be able to exclude up to 100% of the gain from federal taxes. 

Here are the key conditions

  • You must have held the stock for at least 5 years.
  • The stock must have been issued by a qualified C corporation with less than $50 million in assets at the time of issuance.

Ultimately, this stock encourages small business growth by offering investors a generous tax break.

Mutual funds and ETFs

Mutual funds and exchange-traded funds (ETFs) can be more complex. When you invest in mutual funds or ETFs, capital gains can be triggered in two ways:

  • You sell your shares in the fund for a profit (realized gain).
  • The fund sells assets within the portfolio and distributes capital gains to shareholders, even if you didn’t sell anything. These gains are usually reported on a Form 1099-DIV, and you'll owe tax depending on whether they’re short- or long-term.

Some ETFs can be more tax-efficient than mutual funds because of how they’re structured, which helps minimize capital gains distributions.

Capital gains by state 

In addition to federal capital gains taxes, many states also tax your profits when you sell investments or property. But how much you’ll owe depends on where you live. 

In most states, short-term capital gains are taxed just like your regular income. Long-term capital gains may be taxed at the same rate, or in some cases, at a lower rate. And in a handful of states, you won’t pay any capital gains tax at all.

Below is a table showing how each state will treat long- and short-term capital gains:

Do all states have capital gains tax? 

No, not all states don’t have capital gains tax. The following states don’t impose this tax:

  • Alaska
  • Florida
  • Missouri (100% deduction for all filers)
  • Nevada
  • New Hampshire
  • South Dakota
  • Tennessee
  • Texas
  • Washington (short-term gains only)
  • Wyoming

Also, some states that tax capital gains offer deductions or partial exclusions, so your actual tax bill might be lower than the top rate. For the most accurate information, talk to a tax professional or check your state’s Department of Revenue site.

Hidden costs of triggering a capital gain

Beyond the obvious federal and state taxes, there are less visible costs that can affect your overall financial health, especially if your income is pushed into higher brackets. Here are some of the lesser-known financial ripple effects to watch out for when you cash in on capital gains

Net Investment Income Tax (NIIT)

If your income is on the higher side, you could owe an extra 3.8% tax on investment income, including capital gains. It’s called the Net Investment Income Tax (NIIT), and it kicks in when your modified adjusted gross income (MAGI) goes over:

  • $200,000 if you’re single
  • $250,000 if you’re married filing jointly

This tax applies on top of your regular capital gains tax.

Medicare surtax (for high earners)

While capital gains aren’t subject to Medicare payroll taxes, realizing a large gain can push your income over the threshold and subject your earned income (like wages or self-employment income) to the 0.9% Medicare surtax.

The income thresholds are the same as NIIT:

  • $200,000 for single filers
  • $250,000 for married couples filing jointly

The surtax only applies to earned income, but capital gains can still trigger it by raising your total adjusted gross income (AGI) above the line.

Phase-outs of tax deductions and credits

When capital gains increase your adjusted gross income (AGI), they can quietly reduce or completely eliminate your access to valuable tax breaks, which can include:

  • Roth IRA contributions
  • Child Tax Credit
  • Education credits (like the American Opportunity Credit)

Increased premiums for Medicare Part B and D

Capital gains can raise your Medicare premiums in future years. If your income is high enough, you’ll pay more each month for Medicare Part B and D under a system called IRMAA (Income-Related Monthly Adjustment Amount).

This is based on your income from two years ago, so a large gain today could increase your premiums down the road.

State and local taxes (SALT)

Federal taxes get most of the attention, but your state may also take a cut. Capital gains are taxed as income in most states, and some—like California and New York—have top rates over 10%.

Other states offer deductions or exemptions, and a handful don’t tax capital gains at all. But depending on where you live, state taxes could add another 5%–13% or more to your bill.

Transaction costs

Selling an asset can come with fees and commissions that reduce your net gain:

  • Brokerage commissions
  • Trading platform fees
  • Legal and advisory costs
  • Real estate closing costs

Even if you can include some of these in your cost basis for tax purposes, they still reduce your actual profit.

Opportunity cost of reinvestment

Once you sell, you’ve exited an asset that might have continued to grow. That lost potential growth is called opportunity cost, and while it’s not a line item on your tax return, it can have long-term effects on your net worth.

This is especially important for long-term investors and business owners who might trigger a gain in the middle of a high-growth cycle. Consider whether the upside of selling now outweighs what the asset might do in another three to five years.

Calculating your capital gains and losses (4 steps)

Whether you’re selling stock, real estate, or another investment, calculating your capital gain or loss comes down to a few simple steps. Here's how it works:

Step 1: Determining your cost basis

Your cost basis is the amount you originally paid for the asset, plus any commissions, fees, or improvements.

 For example, if you bought 100 shares of stock for $5,000 and paid a $50 brokerage fee, your cost basis is $5,050. Or, if you bought a rental property for $300,000 and spent $25,000 on a new roof, your cost basis is $325,000.

With QuickBooks Online or QuickBooks Solopreneur, you can track your purchases, fees, and improvement expenses in real time. Simply tag these expenses to the asset or investment, attach receipts, and run reports later when it’s time to calculate gains or losses.

Step 2: Calculating net sale proceeds

Next, calculate the net sale proceeds—i.e., the amount you sold the asset for, minus any expenses it took to sell it. These selling costs might include:

  • Brokerage or trading fees
  • Real estate commissions
  • Legal or closing costs
  • Escrow or title transfer fees

For example, if you sold a rental property for $400,000 and paid $24,000 in commissions and fees, your net proceeds would be $376,000. That’s the number you’ll use, along with your cost basis, to figure out your capital gain.

Step 3: Netting gains and losses

If you sold more than one asset, you might have some gains and some losses. The IRS lets you use those losses to reduce your taxable gains. This process is known as netting, and it helps determine the amount of capital gains tax you owe.

Here’s how it works:

  1. Subtract your short-term losses from your short-term gains. This gives you your net short-term gain or loss.
  2. Subtract your long-term losses from your long-term gains to determine your net long-term gain or loss.
  3. Then, combine the results. If one category results in a gain and the other in a loss, you can offset the loss against the gain. For example, if you have a $5,000 net long-term gain and a $2,000 net short-term loss, your overall net capital gain would be $3,000.

Step 4: The capital loss deduction

If your investment losses exceed your gains in a given year, the IRS allows you to use those losses to reduce your taxable income.

You can deduct up to $3,000 of the remaining loss from your ordinary income (like wages or salaries) if you're single or married filing jointly. If you're married filing separately, the limit is $1,500. 

Also, you can carry any leftover losses beyond the annual limit into future tax years. Each year, you can keep deducting up to $3,000 (or $1,500 if married filing separately) until you’ve used up the entire amount.

For example, you had $5,000 in capital gains and $10,000 in capital losses this year. You'd offset the $5,000 gain entirely, leaving you with a $5,000 net loss. You could then deduct $3,000 of that loss from your ordinary income this year and carry over the remaining $2,000 to next year.

Assets that are subject to capital gains in 2025

Here's an overview of common and less common assets that may be subject to capital gains tax:

Stocks, bonds, and mutual funds

When you sell these for a profit, you may owe capital gains tax. If you held them for more than a year, you’ll likely pay the lower long-term tax rate instead of the higher short-term rate.

Real estate

Selling real estate, including rental properties, second homes, or vacant land, can trigger capital gains tax. If you sell your primary home, you may be able to exclude up to $250,000 of profit ($500,000 if married filing jointly) if you meet the ownership and use tests, per Publication 523

Cryptocurrencies

The IRS treats digital currencies like Bitcoin and Ethereum as property. So, if you sell or trade them at a profit, you’ll pay capital gains tax just like with stocks. 

Collectibles

Items like rare art, baseball cards, antiques, vintage wine, and even comic books fall into this category. If you sell a collectible for a gain and you've held it for more than a year, the IRS may tax it at a special long-term rate of up to 28%, higher than other long-term gains.

Precious metals

Profits from selling gold, silver, platinum, or other precious metals (including bullion and certain coins) are taxable. If held in physical form, these are often taxed at the 28% collectibles rate.

Business interests

Selling your share of a business—like an S-corp or LLC—can lead to capital gains tax. How much you owe depends on the type of business and the details of the sale.

Timber and natural resources

If you sell timber from investment land or give up rights to natural resources like oil or gas, you might owe capital gains tax. The rules can vary based on how you got the asset or how you managed it.

Intellectual property (in some cases)

Most self-created works, like patents or copyrights, aren’t considered capital assets and taxed as ordinary income when sold. But if you buy and later sell intellectual property, like licensing rights, it could be taxed as a capital gain.

Examples of capital gains on the most common assets

Let’s walk through a couple of common examples so you know what to expect and how QuickBooks can help you stay organized.

Real estate 

  • Scenario: You bought your home for $300,000 and spent another $50,000 on improvements like a new roof and kitchen remodel. After living there for three years, you sold it for $550,000.
  • Capital gains tax considerations and rates (2025): Because it was your primary residence, you may be able to exclude up to $250,000 of the gain (or $500,000 if you’re married filing jointly). In this case, your profit is $200,000 ($550,000 - $300,000 - $50,000), which falls under the exclusion, so you may owe nothing in capital gains tax.
  • How QuickBooks helps track and document: QuickBooks makes expense tracking easy. You can log every qualifying home improvement by categorizing it as “Improvements—Capitalized” (or something similar). Upload receipts right to the transaction so they’re always easy to find. When it’s time to figure out your cost basis or report a sale, just run a report to see everything laid out clearly

Stocks

  • Scenario: Let’s say you bought 100 shares of a stock for $20 each ($2,000 total). After holding them for 18 months, you sold them at $35 per share, bringing in $3,500. 
  • Capital gains tax considerations and rates (2025): Because you held the stock for over a year, your $1,500 gain is considered a long-term capital gain. Depending on your taxable income, you’ll pay 0%, 15%, or 20% in federal taxes.
  • How QuickBooks helps track and document: Our accounting software lets you set up dedicated investment accounts to track stock purchases, sales, and dividends. You can log each transaction with accurate dates and amounts, attach digital receipts, and categorize gains using custom accounts like “Capital Gains.” When it’s time to file, our financial reporting software makes it easy to calculate your gains and stay tax-ready.

Cryptocurrency

  • Scenario: You bought one Bitcoin at $25,000 and later sold it for $40,000. After holding the coin for 14 months, you made the sale through a crypto exchange.
  • Capital gains tax considerations and rates (2025): Because you held the Bitcoin for more than a year, the $15,000 profit qualifies as a long-term capital gain. That means you’ll pay 0%, 15%, or 20% in federal tax, depending on your taxable income. Crypto is taxed just like other capital assets under IRS rules (IRS Notice 2014-21).
  • How QuickBooks helps track and document: QuickBooks helps you stay organized by allowing you to log each crypto purchase and sale with dates, values, and any exchange fees. You can create a custom account like “Crypto – Capital Gains” to categorize transactions and attach exchange confirmations as digital receipts. When tax season rolls around, run a “Transaction Detail by Account” report to help fill out IRS Form 8949 and Schedule D.

Strategies to minimize your capital gains tax liability

Want to know how to avoid capital gains tax? While it’s difficult to completely avoid capital gains tax, there are several strategies that can help lower the amount you owe when it’s time to report capital gains. Consider the following:

Extend your holding periods

Try to hold on to investments for more than a year when you can. That’s because assets you keep longer qualify for long-term capital gains rates— 0%, 15%, or 20%—which are usually lower than short-term rates. If you sell too soon, you could pay more.

Tax-loss harvesting

Tax-loss harvesting means selling investments that have lost value to cancel out gains from other investments. It’s a smart way to lower your tax bill. Just be careful of the wash-sale rule, which means you can’t claim the loss if you buy the same or a similar investment within 30 days before or after the sale.

Utilize tax-advantaged accounts

Tax-advantaged accounts like 401(k)s, IRAs, HSAs, and 529 plans help you save on taxes. Your money can grow without being taxed each year. In some cases, it can grow completely tax-free. Plus, some of these accounts let you deduct your contributions, which can lower your taxable income.

Charitable giving strategies

If you’re planning to donate, consider giving appreciated assets (e.g., stocks, mutual funds, or real estate) instead of cash. You won’t pay capital gains tax on the appreciation, and you may get a deduction for the full value. It’s a smart way to give back.

Gift or inherited assets

If you inherit an asset, the IRS usually resets its cost basis to its value on the day the original owner died. It’s a stepped-up basis, and it can reduce how much tax you owe if you later sell the asset. Gifting assets also shifts the tax burden, though it comes with different rules. 

Reporting capital gains and losses to the IRS

When it’s time to file your taxes, you’ll need to report any profits or losses from selling investments like stocks, real estate, or cryptocurrency. Here's what that process usually looks like.

Key tax forms: Form 1099-B and Form 1099-DIV

If you sold stocks, mutual funds, or other securities, your broker will send you Form 1099-B. This form tells the IRS (and you) how much you made or lost on each sale, when you bought and sold it, and whether it counts as a short- or long-term gain.

You might also get a Form 1099-DIV if you earned dividends or capital gains distributions from investments like mutual funds. It shows how much income you made and whether any of it qualifies for special tax treatment.

Schedule D and Form 8949

To report capital gains and losses, you’ll fill out Form 8949. That’s where you list each sale—what you sold, when, and for how much. Then, you summarize everything on Schedule D, which calculates your total gain or loss for the year.

Estimated tax payments

If you expect to make a significant gain—e.g., selling a rental property—it’s a good idea to pay quarterly estimated taxes. The IRS wants its cut as you go, and if you wait until tax time, you could face penalties. Use Form 1040-ES to estimate what you owe and send in quarterly payments.

How QuickBooks can help manage your capital gains

Managing capital gains can be complex, but QuickBooks offers tools to simplify the process. Here's how our accounting software can assist you:

Expense and income tracking

When you buy or sell an asset, it’s important to track the price, as well as fees, commissions, or upgrades that affect your cost basis. QuickBooks makes this easy by letting you tag transactions, upload receipts, and label expenses properly. This helps you figure out your real profit or loss when you sell.

Financial reporting and analysis

Want to see how your investments are doing? Our reporting software can generate custom reports that show your gains and losses, highlight trends, and help you spot opportunities (or red flags) ahead of time. It's a great way to plan smarter and avoid tax-time surprises.

Integration with tax preparation

QuickBooks integrates many popular tax software platforms, so you can export your data or link it directly. That means fewer manual entries, fewer mistakes, and less stress when filling out forms like Schedule D and Form 8949.

Navigating capital gains for financial success

Whether you’re selling stocks, a second home, or even some crypto, knowing how taxes work on those profits can help you keep more of what you earn. Remember strategies like holding assets for more than a year, using tax-advantaged accounts, and harvesting losses to offset gains. And use QuickBooks to track your investments, expenses, and sales, so you're always prepared come tax time.

Everyone’s situation is different, especially when large gains or complex assets are involved. That’s why it’s always a smart idea to find a tax advisor who can tailor advice to your goals.

Stay in control of your cash flow

Explore the many ways to manage your cash flow with QuickBooks.


Recommended for you

Mail icon
Get the latest to your inbox
No Thanks

Get the latest to your inbox

Relevant resources to help start, run, and grow your business.

By clicking “Submit,” you agree to permit Intuit to contact you regarding QuickBooks and have read and acknowledge our Privacy Statement.

Thanks for subscribing.

Fresh business resources are headed your way!

Looking for something else?

QuickBooks

From big jobs to small tasks, we've got your business covered.

Firm of the Future

Topical articles and news from top pros and Intuit product experts.

QuickBooks Support

Get help with QuickBooks. Find articles, video tutorials, and more.