Long-Term Holding Deduction

$$LTHD = Gain \times Rate(years, residency)$$