How capital gains tax works and how to pay less

- What is capital gains tax?
- Short-term capital gain tax vs. long-term capital gains tax
- Capital gains tax by asset class
- Capital gains tax rates for 2025
- How to calculate your capital gains tax?
- How to reduce your capital gains tax bill?
- The right information makes the capital gains tax less costly
- FAQ

Capital gains affect anyone who earns a profit on the sale of an asset. That includes everyday investors, startup founders, landlords, and anyone cashing out equity or collectibles. Timing and income both influence how much you owe as capital gains tax. The rules apply whether you are trading frequently or selling a long-held investment.
What is capital gains tax?
Capital Gains Tax
Capital gains tax is a tax on the profit you make when selling an asset for more than you paid for it. The difference between your purchase price and your selling price is referred to as a capital gain, and this gain is considered taxable income.
The Capital gains tax applies to a wide range of assets, including stocks, bonds, mutual funds, real estate, and digital assets like cryptocurrency. If you sell for less than what you paid, you may incur a capital loss instead, which can offset gains and reduce your tax bill.
This gain is categorized as short-term or long-term based on the duration of time you hold the asset before selling it. Short-term gains, on assets held for one year or less, are taxed at your ordinary income rate. Long-term gains on assets held for more than a year are taxed at lower rates.
Most individual filers pay 0%, 15%, or 20% on long-term capital gains tax rates, depending on income. According to IRS data, most filers who reported long-term capital gains in 2025 paid the 15% rate.
Several types of events can trigger capital gains tax. Some of the most common include:
- Selling stocks, ETFs, or mutual funds. If you sell marketable securities for more than your purchase price, the gain is taxable in the year of the sale. This applies whether you invest actively or hold for the long term.
- Selling real estate. Capital gains apply when you sell investment property, rental units, or second homes at a profit. Your tax depends on the profit margin from the sale. If you sell your primary residence, you may qualify for an exclusion of up to $250,000 or $500,000, depending on your filing status.
- Trading cryptocurrency. Selling or exchanging crypto for cash, goods, or services can trigger a taxable event, even if you never converted it to dollars.
- Selling collectibles or valuables. Collectible items or valuables are subject to capital gains tax if sold above your cost basis. These gains may also be taxed at higher rates than other assets.
- Bartering or exchanging assets. If you swap one asset for another and the value has increased since purchase, the IRS considers this a realized gain, even if no cash changed hands.
- Business interest sales or equity buyouts. Selling a stake in a business or cashing out from a company exit can trigger a gain. The tax applies to the difference between your basis and the sale proceeds.
- Asset transfers in divorce or as gifts. Although these transactions are not immediately taxable, the recipient takes on the original cost basis. If they sell later at a gain, they may owe capital gains tax.
Realized vs. unrealized gains: What’s the difference?
Capital gains tax depends on whether your gains are realized or unrealized. A realized gain occurs when you sell an asset and lock in a profit. That gain becomes taxable in the year of the sale. An unrealized gain means your asset has increased in value, but you have not sold it yet, so there’s no tax.
The key difference is timing. Realized gains are subject to tax immediately. Unrealized gains are not taxed until you sell. Here’s a quick comparison:
Category | Realized Gain | Unrealized Gain |
---|---|---|
What it means | Profit from selling an asset | Value increase of an asset you still hold |
When it occurs | When you complete a sale or exchange | While holding the asset without selling |
Tax impact | Taxable in the year the gain is realized | Not taxed until the asset is sold |
Reporting requirement | Must be reported on your tax return | Not reported until the gain is realized |
Impact on cash flow | May increase cash from the sale | Does not affect cash position |
Use in tax strategy | Can trigger gain or loss harvesting | Often used to defer taxes or rebalance portfolio |
Risk exposure | Removed from market volatility | Still exposed to price fluctuations |
Common examples | Selling stocks, property, or crypto |
Short-term capital gain tax vs. long-term capital gains tax
The IRS classifies capital gains as short-term or long-term based on how long you hold an asset before selling. This classification is done to encourage long-term investing over short-term trading. The IRS uses this distinction to apply different tax treatments based on how long you hold an asset before selling it.
Capital gains tax by asset class
Capital gains tax rules vary depending on the type of asset you sell. While the core principles remain the same, the treatment can differ based on how the IRS classifies the asset, how it was used, and how long you held it.
Here’s how capital gains tax typically applies across major asset classes:
- Stocks and mutual funds: If you sell publicly traded shares or mutual fund units at a profit, the gain is taxable. Short-term gains are taxed as ordinary income. Long-term gains follow the 0%, 15%, or 20% structure.
- Real estate or home sale: Investment property gains are taxed as capital gains. If you sell a primary residence, you may qualify for an exclusion of up to $250,000 if single or $500,000 if married filing jointly. The property must meet ownership and use tests to qualify. Depreciation on rental property can also affect the taxable portion of the gain.
- Cryptocurrency: The IRS treats crypto as property. Selling, trading, or spending it can trigger a gain or loss. Gains are taxed at short-term or long-term rates, depending on the holding period. Even converting one token to another counts as a taxable event.
- Collectibles: Gains from collectibles, such as art, coins, or vintage cars, are taxed at a maximum federal rate of 28% if held for longer than one year. This rate applies regardless of your income bracket. If sold within a year, they are taxed at ordinary income rates.
- Business interests: Shares acquired through equity financing in a private business, such as an LLC or S corporation, may qualify for long-term capital gains treatment if held for more than one year. The final tax impact depends on how the sale is structured and whether any special tax provisions apply, such as Section 1202 for qualified small business stock.
- Inherited assets: Assets you inherit receive a step-up in basis to their market value at the time of death. If you later sell the asset, your gain is typically small or zero unless it has appreciated further. Most inherited assets qualify for long-term capital gains treatment regardless of how long you hold them.
Each asset class comes with its own reporting rules. Ramp helps finance teams keep asset-specific transactions categorized correctly across accounting systems, reducing the risk of misreporting.
Capital gains tax rates for 2025
Capital gains tax rates for 2025 depend on two main factors: how long you held the asset and your taxable income. Short-term gains are taxed as ordinary income. Long-term gains follow a separate rate structure with three main brackets.
Long-term capital gains rates for 2025 remain at 0%, 15%, or 20%. These rates apply to most assets held longer than one year and are based on your filing status and total taxable income. Most taxpayers fall into the 15% bracket.
Short-term capital gains are taxed using the regular income tax brackets. For 2025, these range from 10% to 37% and apply to any gains on assets held for one year or less.
These thresholds are adjusted each year to account for inflation. The IRS uses cost-of-living data to update the income brackets annually. This adjustment helps prevent taxpayers from moving into higher brackets solely due to inflation, rather than an increase in real income.
How to calculate your capital gains tax?
To calculate your capital gains tax, you need to know how much profit you made and how that profit is taxed. The basic formula starts with subtracting your cost basis from the sale price to determine any gains from the sale. If the result is a positive number, that is your capital gain.
Your cost basis includes the original purchase price and certain additional costs. These can include brokerage fees, legal costs, or commissions tied to the purchase or sale. If you made improvements to a property, those costs may also increase your basis.
The formula is:
Capital Gain = Sale Price – Adjusted Cost Basis
Once you have the gain, your holding period determines the tax rate. Assets held for one year or less are taxed at ordinary income rates. Assets held longer than one year are taxed using long-term capital gains brackets.
If you sold multiple assets during the year, each transaction must be reported individually. Gains and losses are netted against each other. If your losses exceed gains, you can deduct up to $3,000 in net capital losses against your regular income. The remainder carries forward to future years.
For example, if you sell stock for $10,000 that you originally bought for $7,000, your gain is $3,000. If you held it for over a year and fell into the 15% long-term capital gains bracket, your tax would be $450.
Calculating gains across multiple transactions requires organized data. Ramp syncs with your accounting software and applies AI-based coding rules, so you know every asset sale is recorded with the right details.
How to reduce your capital gains tax bill?
You can minimize capital gains taxes using several IRS-approved strategies. The right approach depends on your income, the type of asset, and the timing of your sale. Here are some of the most effective ways to reduce your tax bill:
- Hold assets for more than one year. Long-term gains are taxed at lower rates than short-term gains. Waiting beyond the one-year mark can cut your tax rate from as high as 37% to as low as 0%, depending on your income.
- Offset capital gains with losses. If you sell an investment at a loss, you can use that loss to reduce your taxable gains. If your total losses exceed your gains, you can deduct up to $3,000 against your ordinary income. Any remaining losses carry forward to future tax years.
- Sell during a low-income year. Capital gains are taxed based on your income. Selling when your income is temporarily lower can cause you to be taxed in a lower bracket. Long-term gains may even qualify for the 0% rate if your income falls below IRS thresholds.
- Use tax-advantaged accounts. Selling assets within retirement accounts, such as IRAs or 401(k) plans, does not trigger capital gains tax. Growth inside these accounts is either tax-deferred or tax-free, depending on the account type.
- Donate appreciated assets to charity. Donating stock or other assets directly to a qualified charity allows you to avoid capital gains tax while also claiming a charitable tax deduction. The asset must be held longer than one year to qualify for full benefits.
- Gift assets to family members in lower tax brackets. If you give appreciated assets to someone in the 0% long-term capital gains bracket, they may be able to sell the asset and avoid tax. The recipient assumes your original cost basis, so careful planning is needed.
- Track holding periods and sale timing. Timing sales around tax years can change how much you owe. Selling just one day after the one-year mark can move your gain from short-term to long-term. Strategic timing also helps avoid triggering surtaxes or phaseouts tied to income.
Timing sales and capturing losses across accounts can get complex. Ramp flags unusual activity, automates coding, and keeps your records updated. This makes it easier to execute tax strategies with clarity.
Is there a way to avoid paying capital gains tax?
Capital gains tax cannot always be avoided, but certain exemptions and planning strategies can reduce or eliminate it in specific cases. These depend on how the asset is used, how long it is held, and how the sale is structured.
- Sale of a primary residence. If you owned and lived in the home for at least two of the last five years, you may exclude up to $250,000 in gains if filing single, or $500,000 if married filing jointly.
- Retirement account transactions. Selling investments inside a Roth IRA, traditional IRA, or 401(k) does not trigger capital gains tax. These accounts grow tax-deferred or tax-free, depending on the structure.
- Inherited assets with a step-up in basis. When you inherit an asset, the cost basis resets to the fair market value on the date of death. If you sell shortly after, there may be little or no taxable gain.
- Charitable donations of appreciated assets. Donating assets like stock to a qualified charity allows you to avoid the capital gain entirely. You may also be eligible for a charitable deduction based on the asset’s market value.
- Qualified small business stock under Section 1202. If you hold qualified small business stock for more than five years, you may exclude up to 100% of the gain, subject to eligibility requirements and limits.
The right information makes the capital gains tax less costly
Capital gains tax depends on what you sell, how long you hold it, and when you decide to take the gain. Each of these decisions can increase or lower your final tax bill, depending on how they align with current tax rules.
The right information makes capital gains tax less costly. Knowing how to calculate your gain, when the IRS considers it taxable, and which strategies apply to your situation gives you more control and fewer surprises.
Planning around capital gains tax doesn’t require complex tools or last-minute fixes. It starts with clear records, smart timing, and a basic understanding of how different asset types are taxed.
Ramp helps you stay prepared by syncing expense data, applying smart categorization rules, and reducing the friction of month-end accounting. With everything organized in real time, your team spends less time sorting through transactions and more time planning for what’s next.
FAQ
Do capital gains on inherited property receive a step-up in basis?
Inherited assets generally receive a step-up in basis, which means the cost basis is reset to the asset’s fair market value as of the date of the original owner's death. If you later sell the asset, your capital gain is calculated using the stepped-up basis, often resulting in little or no taxable gain.
What were the capital gains tax rates for 2024?
In 2024, long-term capital gains were taxed at 0%, 15%, or 20% based on income and filing status. The thresholds were slightly lower than in 2025 due to annual inflation adjustments. For example, the 15% bracket began at $44,625 for single filers and $89,250 for those filing jointly. Short-term capital gains were taxed at ordinary income rates, just like in 2025.
How does depreciation recapture increase the tax on a rental property sale?
When you sell a rental property, any depreciation you claimed during ownership must be "recaptured" and taxed separately. Depreciation recapture is taxed as ordinary income, up to a maximum rate of 25 percent, which can increase the total tax owed on the sale.
Are capital gains taxed differently by individual states compared with federal rules?
While federal capital gains rates follow a fixed structure, states have their own tax rules. Some states, like Florida and Texas, do not tax capital gains at all. Others, such as California and New York, tax them as ordinary income without offering a lower rate for long-term capital gains.
Are there any tax credits that help reduce capital gains tax?
Capital gains tax is not typically offset by direct tax credits, but certain credits can lower your overall tax liability, which may indirectly reduce what you owe. For example, the Foreign Tax Credit may apply if you paid capital gains tax to another country. In some cases, a tax advisor may identify other earned income tax credits that lower your total liability, such as the Lifetime Learning Credit or Child Tax Credit, depending on your income and filing status.

Don't miss these
“We’ve simplified our workflows while improving accuracy, and we are faster in closing with the help of automation. We could not have achieved this without the solutions Ramp brought to the table.”
Kaustubh Khandelwal
VP of Finance, Poshmark

“Our previous bill pay process probably took a good 10 hours per AP batch. Now it just takes a couple of minutes between getting an invoice entered, approved, and processed.”
Jason Hershey
VP of Finance and Accounting, Hospital Association of Oregon

“When looking for a procure-to-pay solution we wanted to make everyone’s life easier. We wanted a one-click type of solution, and that’s what we’ve achieved with Ramp.”
Mandy Mobley
Finance Invoice & Expense Coordinator, Crossings Community Church

“We no longer have to comb through expense records for the whole month — having everything in one spot has been really convenient. Ramp's made things more streamlined and easy for us to stay on top of. It's been a night and day difference.”
Fahem Islam
Accounting Associate, Snapdocs

“It's great to be able to park our operating cash in the Ramp Business Account where it earns an actual return and then also pay the bills from that account to maximize float.”
Mike Rizzo
Accounting Manager, MakeStickers

“The practice managers love Ramp, it allows them to keep some agency for paying practice expenses. They like that they can instantaneously attach receipts at the time of transaction, and that they can text back-and-forth with the automated system. We've gotten a lot of good feedback from users.”
Greg Finn
Director of FP&A, Align ENTA

“The reason I've been such a super fan of Ramp is the product velocity. Not only is it incredibly beneficial to the user, it’s also something that gives me confidence in your ability to continue to pull away from other products.”
Tyler Bliha
CEO, Abode
