when you sell an investment real estate or any other asset for a gain you owe taxes on the gain if you sell it for a loss you can report it as a capital loss capital gains are taxed in two different ways long term capital gain and short term capital gain if you ve held an asset for one year or less and sold it for a gain it is a short term capital gain included in your income 
if you hold an asset for more than one year and sell it for a gain it is considered a long term capital gain and is subject to the capital gains tax there are capital gains thresholds similar to income tax brackets here is how it works assume you purchase 100 shares of xyz common stock for 10 000 in 2022 and sell them five years later for 18 000 the 8 000 gain is a taxable event because you held the stock for more than one year the gain is a long term capital gain 4using the previous example if your adjusted gross income was 60 000 your capital gains bracket is 15 so you d need to pay 15 of 8 000 in taxes or 1 200 if you had held the stocks for less than one year you d include the 8 000 in your gross income before subtracting your standard deduction so if you earned 72 950 and had 8 000 in short term capital gains your total income is 80 950 if your filing status and other deductions were the same as in the previous example you d still be in the 22 tax bracket and would work through the calculations the same way with the new income amount 