(1) First, a net loss from a class of long-term capital gain and loss (beginning with the class subject to the highest federal income tax rate and ending with the class subject to the lowest rate) is used to offset net gain from each other class of long-term capital gain and loss, in turn, until exhaustion of the class, beginning with the class subject to the highest federal income tax rate and ending with the class subject to the lowest rate.
(2) Second, either:
(a) a net loss from all the classes of long-term capital gain and loss (beginning with the class subject to the highest federal income tax rate and ending with the class subject to the lowest rate) is used to offset any net gain from the class of short-term capital gain and loss; or
(b) a net loss from the class of short-term capital gain and loss is used to offset any net gain from each class of long-term capital gain and loss, in turn, until exhaustion of the class, beginning with the class subject to the highest federal income tax rate and ending with the class subject to the lowest federal income tax rate.