As just about every investor knows, it’s not what your investments earn, but what they earn after taxes that counts. Reducing your tax liability is key to building the value of your assets, especially if you are in one of the higher income-tax brackets.

Investing in tax-deferred and tax-free accounts is one way to potentially lower your tax bill.

Tax-deferred accounts include company-sponsored retirement savings accounts such as traditional 401(k) and 403(b) plans, traditional individual retirement accounts (IRAs), and annuities. Contributions to these accounts may be made on a pretax basis (i.e., the contributions may be tax-deductible) or on an after-tax basis (i.e., the contributions are not tax-deductible). More important, investment earnings compound tax-deferred until withdrawal, typically in retirement, when you may be in a lower income-tax bracket. Contributions to nonqualified annuities, Roth IRAs and Roth-style employer-sponsored savings plans are not tax-deductible. Earnings that accumulate in Roth accounts can be withdrawn tax-free if you have held the account for at least five years and meet the requirements for a qualified distribution.

Pitfalls to avoid: Withdrawals prior to age 59½ from a qualified retirement plan, IRA, Roth IRA, or annuity may be subject not only to ordinary income tax, but also to an additional 10 percent federal tax. Early withdrawals from annuities also may be subject to additional penalties charged by the issuing insurance company.

If you have significant investments, in addition to money you contribute to your retirement plans, consider your overall portfolio when deciding which investments to select for your tax-deferred accounts. If your effective tax rate — that is, the average percentage of income taxes you pay for the year — is higher than 15 percent, you’ll want to evaluate whether investments that earn most of their returns in the form of long-term capital gains might be better held outside of a tax-deferred account. That’s because withdrawals from tax-deferred accounts generally will be taxed at your ordinary income tax rate, which may be higher than your capital gains tax rate.