There are myriad accounts whose holdings receive tax-favorable treatment, such as your company’s 401(k) plan, traditional and Roth IRAs, 529 college savings accounts, health savings accounts, and others. Each type is subject to different tax treatments as you add or remove funds. But for all of them, interest, dividends and capital gains on holdings that remain in the account are not taxed along the way (nor can capital losses be used to offset the untaxed gains). For some account types, you do incur ordinary income taxes when you withdraw assets from the account. As always, your tax professional can advise you on the details.