When you make investment gains, the tax man will want his cut. Image source: Flickr user kev-shine.

We're all pretty much used to paying taxes on our regular income. But did you know that you could be taxed on your investments, too? If you make money on an investment, whether it's stocks, bonds, or real estate, you may be subject to what's known as a capital gains tax, but the rate at which you're taxed will depend on how long you held the asset in question.

Long-term versus short-term gains
The IRS makes a distinction between assets that are held for more than a year and those that are sold within a year of being purchased. If you buy an asset and sell it at a profit before the one-year mark, then it's considered a short-term capital gain. On the other hand, if you buy an asset and sell it at a profit after having held on to it for a year or longer, it's considered a long-term capital gain.

Here's why that really matters: Short-term capital gains are taxed as ordinary income, while long-term capital gains are taxed at a lower rate. Say your salary gets taxed at 25%. If you have a short-term capital gain, you'll lose 25% of your profit to taxes. On the other hand, if you have a long-term gain, your tax rate will fall somewhere between 0% and 20%, depending on how much money you earn.

Here's what you're looking at in long-term capital gains taxes depending on your income:

Single Income

Married and Filing Jointly Income

Long-Term Capital Gains Tax Rate

$0 to $9,275

$0 to $18,550

0%

$9,275 to $37,650

$18,550 to $75,300

0%

$37,650 to $91,150

$75,300 to $151,900

15%

$91,150 to $190,150

$151,900 to $231,450

15%

$190,150 to $413,350

$231,450 to $413,350

15%

$413,350 to $415,050

$413,350 to $466,950

15%

More than $415,050

More than $466,950

20%

Data source: IRS.

Additionally, some taxpayers may be subject to an extra tax on capital gains. It's called the Net Investment Income Tax, and it dings higher earners to the tune of 3.8% of their investment profits. Single tax filers earning over $200,000 and married couples filing jointly earning more than $250,000 may be liable for this added tax.

Offsetting gains with losses
Not all investments make money. But even if you wind up selling an investment at a loss, there's a bit of good news: You can use that loss to offset your capital gains, thereby reducing your tax burden. Say you have $3,000 in capital gains and $3,000 in capital losses in a given year. Your losses will actually cancel out your gains so that you're not paying taxes on them at all. Furthermore, you can use capital losses to lower your taxable income for a given year even if you don't have any capital gains during that time. You're allowed to claim a loss of up to $3,000, and if your net loss exceeds that amount, you can carry the remainder forward and use it to offset the following year's capital gains.

Deciding when to sell your assets
Understanding how capital gains are taxed can help you make the best strategic decisions for your portfolio. Say you're ready to sell a certain stock for $2,000 more than what you paid for it. If your effective tax rate is 25% and you sell that stock 10 months after you bought it, then you'll lose $500 to short-term capital gains taxes. On the other hand, if you wait until you've held that stock for a year and a day, you'll get bumped into the more desirable long-term capital gains category, and, assuming you fall into the 15% tax bracket like most Americans, you'll only lose $300 to taxes.

Of course, having to pay taxes on your gains might seem like a drag. But on the plus side, the fact that you're facing capital gains taxes means you have some earnings to show for, which is a good situation to be in no matter how you look at it.