Which reports are showing this as a capital gain? The Tax reports (Capital Gains and Schedule D) do not include tax deferred accounts by default and thus should not be showing capital gains in these accounts. If the 529 account is included in these reports, go to the Account Details and make sure Tax Deferred is checked.By default, the other Investing reports (Investing Activity for example) include all your investing accounts and thus show the capital gains for tax deferred accounts, even though the gains are not taxable. If you want to exclude an account from one of these reports, click on the gear at the top right of the report, click on Accounts, and un-check the account.