Investors cannot claim a tax loss on the sale of a security if they buy a “substantially identical” security within 30 days before or after the sale, as per the wash-sale rule, a tax regulation. The Internal Revenue Service (IRS) in the United States established the wash-sale rule, which restricts investors from deducting a tax loss from their taxes if they sell an investment at a loss and subsequently buy a virtually identical security within the 30-day window. Instead, they must factor the loss into the new security’s cost base, which will reduce their gain or raise their loss when they ultimately sell the new asset. Cost basis refers to the original value of an asset, such as a stock or a cryptocurrency, that is used to determine the taxable gain or loss when the asset is sold or disposed of. The cost basis is typically the purchase price of the asset, including any fees or commissions associated with the purchase. The cost basis may be changed to reflect the asset’s fair market value at the time of acquisition if the asset was received as a gift or through inheritance. When an asset is sold, the capital gain or loss is determined using the cost basis. The investor obtains a capital gain and may be subject to taxation on that gain if the asset’s sale price exceeds its cost basis. The investor experiences a capital loss if the sale price is less than the cost basis. This loss can be used to offset capital gains and minimize the investor’s tax burden.
Full explanation : What is the wash-sale rule, and does it apply to crypto?