Gain allocated to periods of nonqualified use
For purposes of subparagraph (A), gain shall be allocated to periods of nonqualified use based on the ratio which—
(i)#
the aggregate periods of nonqualified use during the period such property was owned by the taxpayer, bears to
(ii)#
the period such property was owned by the taxpayer.