dmertz
Level 15

Deductions & credits

Your comparison is flawed.  Distributions from IRA are taxable as ordinary income; the capital-gains tax rate is not involved at all.  Not treating it as an HFD results in an addition to ordinary income of $4,500 and a deduction of $4,500 for a net change of $0 in AGI, and therefore no effect on the amount of other income that might be taxable as long-term capital gains.  In both cases the contribution to the HSA is $4,500.  There is no taxable difference between the two choices.  The only differences are that treating it as an HFD uses up the once-in a lifetime HFD and makes the contribution subject to income tax and a 10% penalty if the HFD testing period is not completed, neither of which is desirable.