529 Plans in Beancount: Tax Deductions, Contribution Tracking, and the New 2026 Rules

As an Enrolled Agent, I help a lot of families navigate 529 plans. Here’s how to set up Beancount to capture all the tax benefits and stay compliant with the new 2026 rules.

What’s New for 2026

The One Big Beautiful Bill Act brought significant changes:

  1. K-12 withdrawal limit doubled - Now $20,000/year per student (was $10,000)
  2. New qualified expenses - Tutoring, standardized test fees, vocational training, educational therapies
  3. 529-to-Roth IRA rollover - Up to $35,000 lifetime (account must be 15+ years old)

The Basic 529 Account Structure

; One account per child, per plan
2020-09-01 open Assets:Investments:529:Emma:StatePlan    USD, 529.EMMA.STATE
2022-03-15 open Assets:Investments:529:Jack:StatePlan    USD, 529.JACK.STATE

; For tracking contributions vs growth
2020-09-01 open Equity:Opening-Balances:529

Tracking Contributions for State Tax Deductions

This is the critical piece. Most states cap how much you can deduct:

State 2026 Limit Notes
Iowa $6,100/beneficiary In-state plans only
Wisconsin $5,280/beneficiary In-state plans only
New York $5,000 single / $10,000 joint In-state plans only
Pennsylvania Unlimited Any plan qualifies!

I use metadata to track deduction eligibility:

2026-01-15 * "Monthly 529 contribution"
  state-deductible: TRUE
  tax-year: 2026
  beneficiary: "Emma"
  Assets:Investments:529:Emma:StatePlan   500.00 USD
  Assets:Bank:Checking                   -500.00 USD

Year-end query to pull deductible contributions:

SELECT 
  META('beneficiary') as child,
  SUM(CONVERT(position, 'USD')) as total
WHERE 
  META('state-deductible') = TRUE 
  AND META('tax-year') = 2026
  AND account ~ '529'
GROUP BY META('beneficiary')

Tracking Distributions (Withdrawals)

When you use 529 funds, you need to document the qualified expense:

2026-08-15 * "University of State - Fall tuition"
  expense-type: "qualified-higher-ed"
  qualified-529: TRUE
  Expenses:Kids:Emma:Education:Tuition    15000.00 USD
  Assets:Investments:529:Emma:StatePlan  -15000.00 USD

2026-09-01 * "Tutoring Center - Math help"
  expense-type: "qualified-k12"  ; New for 2026!
  qualified-529: TRUE
  Expenses:Kids:Jack:Education:Tutoring    200.00 USD
  Assets:Investments:529:Jack:StatePlan   -200.00 USD

The Superfunding Strategy

You can contribute 5 years of gift tax exclusion in one year:

  • 2026 limit: $95,000 individual / $190,000 joint
  • Must file Form 709 to elect the 5-year averaging
2026-01-02 * "529 Superfunding - 5-year election"
  superfunding: TRUE
  gift-tax-form: "709"
  election-years: "2026-2030"
  Assets:Investments:529:Emma:StatePlan   95000.00 USD
  Assets:Bank:Checking                   -95000.00 USD

Warning: No additional gifts to that beneficiary for 5 years without exceeding the annual exclusion.

The New 529-to-Roth Rollover

Starting in 2024, you can roll 529 funds into a Roth IRA for the beneficiary:

Rules:

  • Account must be open 15+ years
  • Contributions from last 5 years can’t be rolled
  • $35,000 lifetime limit
  • Subject to annual Roth contribution limits ($7,000 in 2026)
2026-01-15 * "529 to Roth IRA rollover - Emma"
  rollover-type: "529-to-roth"
  529-account-age: 16  ; years
  lifetime-rolled: 7000.00  ; cumulative
  Assets:Investments:Roth:Emma          7000.00 USD
  Assets:Investments:529:Emma:StatePlan -7000.00 USD

Common Mistakes to Avoid

  1. Not tracking cost basis separately from gains - You need this for non-qualified withdrawals
  2. Missing the state deduction limit - Contributing more than deductible is fine, just know the limit
  3. Same-year contribution/distribution netting - Some states reduce your deduction by withdrawals
  4. Forgetting to track qualified vs non-qualified - Non-qualified distributions have penalties

Year-End Checklist

  • Review total contributions per beneficiary vs state limit
  • Verify all distributions were for qualified expenses
  • Check if superfunding election affects gift exclusion
  • Export data for state tax return
  • Update price directives for year-end values

Questions? The 529 rules are complex, but proper Beancount tracking makes tax time much easier.

Great breakdown, Tina! I used the superfunding strategy when our first was born and wanted to share the experience.

My Superfunding Story

We did $70,000 from grandparents (gift-split $35k each) plus our own $25,000 when our daughter was born. Total: $95,000 into one account on day one.

Why we did it:

  • Maximum time in market for compounding
  • Grandparents were doing estate planning anyway
  • Locked in the gift tax exclusion for 5 years

The tracking complexity:

2020-03-15 * "529 Superfunding - Grandparents gift-split"
  superfunding: TRUE
  gift-from: "Grandparents"
  gift-split: TRUE
  form-709-filed: "2020"
  election-years: "2020-2024"
  Assets:Investments:529:Daughter:WA529    70000.00 USD
  Income:Gifts:529:Daughter               -70000.00 USD

2020-03-15 * "529 Superfunding - Our contribution"
  superfunding: TRUE  
  gift-from: "Parents"
  form-709-filed: "2020"
  election-years: "2020-2024"
  Assets:Investments:529:Daughter:WA529    25000.00 USD
  Assets:Bank:Checking                    -25000.00 USD

6 years later:
That $95k is now ~$145k. Time in market matters!

One Warning

If you superfund, you need to track the 5-year window carefully. When our son was born 3 years later, we couldn’t give additional gifts to our daughter without filing another Form 709 (and using lifetime exemption). I have a note in my ledger:

; NOTE: Daughter's 529 superfunding election runs through 2024
; No additional 529 gifts without exceeding annual exclusion
; until 2025 tax year

Now that we’re past 2024, we’re back to normal annual contributions for her.

For families with multiple beneficiaries, here’s how I recommend structuring the accounts:

Multi-Beneficiary Setup

; Separate account per child, per plan type
2020-01-01 open Assets:Investments:529:Child1:State    USD
2020-01-01 open Assets:Investments:529:Child1:Vanguard USD
2022-06-01 open Assets:Investments:529:Child2:State    USD
2024-09-01 open Assets:Investments:529:Child3:State    USD

Why separate by plan type?

  • State plans give tax deductions, out-of-state may have better funds
  • Some families use their state plan up to the deduction limit, then contribute to a better out-of-state plan

Tracking Beneficiary Changes

529s allow you to change the beneficiary (to a family member) without penalty. This is common when:

  • One child gets a scholarship
  • One child doesn’t go to college
  • Leftover funds after graduation
2026-05-15 * "529 beneficiary change - Child1 to Child2"
  note: "Child1 received full scholarship"
  old-beneficiary: "Child1"
  new-beneficiary: "Child2"
  ; Close old account
  Assets:Investments:529:Child1:State    -45000.00 USD
  ; Open/transfer to new beneficiary's account
  Assets:Investments:529:Child2:State     45000.00 USD

The Aggregate Limit Tracking

Each state has a maximum lifetime balance (typically $300k-$620k). If you have multiple accounts for one child, you need to track the total:

; Query to check aggregate by child
SELECT 
  LEAF(account) as child,
  SUM(CONVERT(balance, 'USD')) as total_529
WHERE 
  account ~ '529'
GROUP BY LEAF(account)

Most families won’t hit these limits, but if grandparents are superfunding, it’s worth monitoring.

For those just starting out, here’s a simpler 529 setup that covers 90% of what you need:

The Minimal 529 Setup

; Just one account per child
2026-01-01 open Assets:Investments:529:Kiddo    USD

; Contributions - track the basics
2026-01-15 * "Monthly 529 contribution"
  Assets:Investments:529:Kiddo    500.00 USD
  Assets:Bank:Checking           -500.00 USD

That’s it to start. No metadata, no complex structures.

When to Add Complexity

Add state-deductible metadata when:

  • You’re close to your state’s deduction limit
  • You have multiple 529s and need to track which qualifies

Add expense-type metadata when:

  • You start taking distributions
  • You want audit-ready records

Add multiple accounts when:

  • You have multiple kids
  • You use both state and out-of-state plans

My Evolution

Year 1: Just Assets:Investments:529:Daughter with no metadata
Year 3: Added state-deductible: TRUE when I realized I was over the limit
Year 5: Split into State and Vanguard accounts
Year 8: Added all the metadata for distributions

Don’t over-engineer at the start. You can always add structure later, and Beancount makes it easy to refactor.