HSAs allow you to make tax-deductible contributions for future medical expenses. Earnings, including gains in the HSA are tax deferred. Your HSA funds, both contributions and earnings, continue to be tax free as long as they are used to pay for qualified medical expenses.