Pretty much everything you own is a capital asset. Your home, your tangible personal property (like furnishings), and your stocks and bonds are all capital assets. When you sell a capital asset, the difference between the basis in the asset and the amount you realized from the sale is a capital gain or a capital loss. Generally, an asset's basis is its cost to the owner (certain adjustments may apply). How much these gains are taxed depends on how long you held the asset before selling.
In 2020 the capital gains tax rates are -- 0%, 15% or 20% for most assets held for greater than a year. Long-term capital gains on collectibles like coins, precious metals, antiques and art are generally taxed at 28%.
Capital gains tax rates on most assets held for less than a year are taxed at the same rate applicable to ordinary income (like wages) -- 10%, 12%, 22%, 24%, 32%, 35% or 37%.
The actual tax rate applicable to you depends on your income and filing status.
Usually it is beneficial to hold an asset for a year or longer so you can qualify for the long-term capital gains tax rate, since it's lower than the short-term capital gains rate for most assets. To determine how long you held an asset, you generally count from the day after the day you acquired the asset up to and including the day you disposed of the asset.
Generally, if your capital losses exceed your capital gains, the amount of the excess loss that you can claim to lower your income is the lesser of $3,000 ($1,500 if married filing separately) . If your net capital loss exceeds this limit, you can carry the loss forward to later years.