Taxes · November 14, 2026
How Are HSA Investments Taxed in California?
Learn how California taxes HSA contributions, dividends, and capital gains, and weigh federal compounding against state tax drag and reporting.
14 min read · 11 sections

California taxes health savings account (HSA) investments as if they sit inside an ordinary taxable brokerage account rather than a federally sheltered retirement vehicle. Under rules administered by the Franchise Tax Board, California does not conform to Internal Revenue Code Section 223. Contributions do not reduce state taxable income, and interest, dividends, and realized capital gains earned inside the account are subject to California personal income tax in the year generated.
That state-level treatment changes the math for California engineers and tech employees who treat an HSA as a supplemental retirement account. Generic guides describe an HSA as completely sheltered from tax on deposits, growth, and medical withdrawals. While that holds true at the federal level under Internal Revenue Service (IRS) rules, California residents face annual state tax liability and manual basis tracking whenever HSA funds are invested in stocks or bonds.
Choosing whether to settle current medical bills out of pocket so an HSA can compound over decades involves balancing two opposing forces. On one side sit upfront federal income and payroll tax savings plus decades of federally untaxed growth. On the other side sit ongoing California income taxes on contributions and investment returns, alongside substantial manual bookkeeping without standard tax forms from account custodians.
How California Taxes HSA Investments
California rejects federal tax-exempt treatment for HSAs under its personal income tax code. Because the state legislature has not conformed to Internal Revenue Code Section 223, the Franchise Tax Board treats every HSA as a regular individual investment account. State residents cannot deduct HSA deposits from California gross income, and any investment income produced inside the account flows directly onto the annual state tax return.
Reporting those amounts requires explicit adjustments on Schedule CA (540), the California Adjustments schedule filed alongside Form 540. Because federal adjusted gross income serves as the starting point for the California return, filers make positive adjustments to add back excluded payroll contributions, reversed personal deductions, annual interest, and ordinary dividends. Realized capital gains and losses from selling or rebalancing HSA holdings are calculated separately and reported on California Schedule D (540).
This split tax regime produces a sharp contrast between federal and state outcomes. At the federal level, eligible individuals enjoy a three-stage shelter: pre-tax contributions, untaxed compounding, and untaxed distributions for qualified medical expenses. In California, the opening two stages are stripped away by state tax drag, leaving only the final medical withdrawal free of state tax because the underlying principal and investment earnings have already been taxed by Sacramento.
Federal Tax Advantages vs. California Non-Conformity
At the federal level, the IRS establishes annual contribution ceilings for individuals enrolled in qualifying high-deductible health plans. Under Revenue Procedure 2025-19, the 2026 federal deduction limit is $4,400 for self-only coverage and $8,750 for family coverage. Under IRS Publication 969, eligible individuals who are age 55 or older before the close of the tax year can contribute an additional $1,000 catch-up amount.
Funding an HSA through an employer cafeteria plan amplifies those federal savings. Under federal tax law, payroll deductions directed into an HSA are excluded from federal gross income as well as Medicare and Social Security payroll taxes. Direct contributions made outside payroll still qualify for an above-the-line federal income tax deduction, though they remain subject to federal payroll taxes.
California law contains no comparable exclusion or deduction. As documented in Franchise Tax Board legislative analyses such as AB 781, California's deliberate non-conformity to Internal Revenue Code Section 223 prevents residents from shielding HSA deposits or account earnings from state income tax. Attempting a once-in-a-lifetime Qualified HSA Funding Distribution from an IRA also triggers California income tax on the transfer plus a 2.5% California additional tax on early distributions.
One silver lining appears when funds eventually leave the account. According to Franchise Tax Board analysis of AB 2384, qualified medical distributions from an HSA are not taxed on California returns because the contributions and investment earnings inside the account were already taxed by the state in prior years. In addition, California does not impose the federal 20% additional tax on non-qualified withdrawals.
- $4,400Self-only coverage limit
- $8,750Family coverage limit
- $1,000Age 55 catch-up amount
The maximum amounts individuals and families can contribute to a health savings account for 2026.
Reporting Payroll and Direct Contributions on Schedule CA (540)
California residents who fund an HSA through employer payroll deductions see those amounts excluded from federal taxable wages on Form W-2. Instead, the combined employer and employee cafeteria-plan contributions appear in Box 12 of Form W-2 with Code W. Because California taxes those deposits, Franchise Tax Board instructions for Schedule CA (540) direct filers to enter the Box 12 Code W total on line 1h, column C as an addition to California income.
Direct contributions sent to an HSA custodian outside of payroll require a different adjustment line. On the federal return, those direct deposits are claimed as an above-the-line deduction on federal Schedule 1, line 13. Because California does not recognize that deduction, Schedule CA (540) instructions direct filers to enter the federal deduction amount on line 13, column B, reversing the federal subtraction so those dollars remain inside California adjusted gross income.
A common filing error occurs when residents rely on commercial tax preparation software without checking the state schedules. Automated import tools sometimes pull W-2 Box 12 Code W figures correctly for federal verification while failing to map them into Schedule CA (540) line 1h column C, or misclassifying employer contributions against personal deductions. Leaving Code W off Schedule CA understates California taxable income and invites automated Franchise Tax Board adjustment notices.
Annual Taxation of Dividends, Interest, and Capital Gains
Investment income generated inside an HSA becomes taxable in California during the calendar year it is earned or realized, regardless of whether any cash leaves the account. Under Franchise Tax Board instructions for Schedule CA (540), interest earned by HSA cash sweeps or money market funds belongs on line 2, column C, while ordinary dividends belong on line 3, column C as additions to California income.
Rebalancing a portfolio, switching mutual funds, or selling shares inside an HSA creates taxable capital gains or deductible capital losses for California purposes. Filers determine the net gain or loss using California-specific cost basis and report those transactions on California Schedule D (540), carrying the resulting adjustment to Schedule CA (540), line 7a. Even routine automated rebalancing inside a robo-advised HSA triggers reportable state capital gains or losses.
These annual reporting rules collide with a major administrative hurdle. Because HSAs are federally tax-exempt trusts, custodians and brokerage platforms do not issue Form 1099-DIV for dividends, Form 1099-INT for interest, or Form 1099-B for securities sales. Account holders who wait for year-end 1099 tax packets from their HSA provider will receive nothing, leading many California filers to omit taxable investment returns from their state returns by mistake.
Another frequent pitfall stems from enabling automatic dividend reinvestment inside an HSA brokerage account. Reinvested distributions still count as taxable California dividends or interest in the year distributed, even though no cash entered a checking account. Without logging each reinvested dividend's exact dollar amount and trade date, a resident faces significant difficulty reconstructing accurate California tax returns and share basis years later.
The Compounding Equation: Multi-Decade Growth vs. State Tax Drag
The appeal of using an HSA as a supplemental retirement vehicle relies on delaying medical reimbursements. Under IRS Publication 969, account holders can cover current deductibles, dental work, and prescriptions out of regular checking cash while allowing HSA investments to remain invested. Because the IRS imposes no deadline to claim reimbursement in the year an expense occurs, those accumulated receipts can remain on file for decades while the invested balance compounds.
Over a 20-year horizon, sustained contributions paired with market compounding can transform a modest HSA into a substantial healthcare reserve. In an arithmetic illustration assuming a $10,000 starting balance and $4,400 added annually over 20 years without withdrawals or friction, a 4% annual growth rate reaches $152,935, while a 7% annual growth rate reaches $219,077. Those figures are pure arithmetic illustrations of fixed compounding rates rather than predictions of future market performance.
In California, however, state income taxes siphon away a slice of that compounding capacity every year. High-earning engineers and tech workers in upper California marginal tax brackets face state tax bills on their HSA dividends, interest, and realized capital gains each April. When residents settle those state tax liabilities using outside checking funds, the HSA balance stays intact, though total household after-tax wealth absorbs the annual drag.
Quantifying Friction: How Annual Drag Erodes Long-Term Balances
Annual tax payments and fund management fees reduce net returns each year, and the cumulative impact compounds alongside the underlying principal. To illustrate how small annual deductions erode long-term balances, consider a $10,000 starting principal compounding at a 7% baseline rate over 20 years with no additional contributions. With 0% annual drag, the arithmetic balance reaches $38,697. A 1% annual drag lowers the ending balance to $32,071, which is $6,625 less, while a 2% annual drag reduces it to $26,533, or $12,164 less than the frictionless case.
These arithmetic comparisons show why investment selection and portfolio turnover carry outsized weight for California HSA holders. Funds with frequent internal trading or high ordinary dividend yields generate larger annual California tax adjustments, pushing effective annual drag higher even when nominal pre-tax returns look identical. Conversely, holdings that produce minimal annual taxable distributions keep annual California tax friction closer to the lower end of that range.
Some California residents adjust asset allocation inside an HSA to dampen annual state tax drag. Holding direct U.S. Treasury obligations or Treasury funds whose interest qualifies for California exemption avoids state income tax on interest distributions on Schedule CA (540). Other account holders lean toward broad, low-turnover index funds that distribute modest qualified dividends and rarely realize capital gains, saving active rebalancing for federally sheltered workplace retirement plans or IRAs.
Manual Record-Keeping and California Cost Basis Requirements
Because California taxes HSA earnings annually and taxes capital gains on sale, account holders maintain a separate California cost basis for every security held in the HSA. On a federal return, HSA cost basis is irrelevant because qualified medical withdrawals are untaxed and distributions are not reported per share lot. For California purposes, cost basis equals the original purchase price of each lot plus transaction costs and all previously taxed reinvested dividends.
Without Form 1099-B or custodian basis tracking, preserving accurate records falls entirely on the account holder. Keeping monthly or annual brokerage statements, individual trade confirmations, and spreadsheets recording dividend reinvestment dates and share prices prevents double taxation when shares are eventually sold. Every reinvested dividend taxed on Schedule CA (540) increases California cost basis, reducing future taxable capital gains upon liquidation.
Separate documentation is equally necessary to satisfy federal reimbursement rules. IRS Publication 969 requires account holders to retain itemized receipts and explanation-of-benefits statements proving that any eventual HSA distribution covered qualified medical expenses incurred after the HSA was established, and that those expenses were not reimbursed from another source or deducted elsewhere.
Custodian transfers and fund switches create hidden basis traps when records are incomplete. Moving an HSA to a new administrator by liquidating existing funds to cash triggers realized capital gains or losses for California in the transfer year. Even an in-kind transfer between custodians leaves the receiving brokerage with zero visibility into historical California purchase prices, forcing the account holder to carry forward historical basis spreadsheets manually.
Worked Example: Evaluating the Decision for a California Tech Professional
Consider a 35-year-old software engineer living in Mountain View, California, enrolled in a self-only high-deductible health plan. Holding an existing $10,000 HSA investment balance, the engineer plans to contribute the 2026 federal self-only maximum of $4,400 annually for 20 years while settling current medical bills from regular checking funds. Under arithmetic compounding examples, $10,000 plus $4,400 added each year for 20 years grows to $152,935 at a 4% annual rate or $219,077 at a 7% annual rate, assuming steady contributions and zero mid-period withdrawals.
Evaluating California tax friction against those compounding totals clarifies the net trade-off. Using the 7% baseline illustration on the existing $10,000 balance alone over 20 years, a 0% frictionless baseline reaches $38,697, whereas a 1% annual drag leaves $32,071 ($6,625 less) and a 2% annual drag reduces the balance to $26,533 ($12,164 less). Adding annual California tax liability on dividends, interest, and realized capital gains shrinks the state-adjusted growth rate relative to a conforming state, even when upfront federal income and FICA exemptions provide meaningful annual tax savings.
Alongside those tax calculations sits the ongoing compliance burden of tracking reinvested dividends without Form 1099 forms and updating Schedule CA (540) and Schedule D (540) each spring. In evaluating how to deploy an HSA in California, residents commonly weigh three distinct approaches, each carrying separate trade-offs between federal compounding, state tax drag, and bookkeeping effort.
Before settling on an allocation, a California resident can bring targeted questions to an independent tax professional or financial advisor. Useful questions include how the household's combined federal and California marginal brackets affect the value of immediate payroll tax savings, whether low-turnover index funds or California-exempt U.S. Treasuries align better with the rest of the investment portfolio, what spreadsheet workflow will cleanly preserve California cost basis across years, and how a potential future move to a conforming state would alter withdrawal planning.
- Invest HSA for Long-Term Growth While Covering Medical Bills Out of Pocket: Contribute the annual federal limit via payroll deduction, invest in equity index funds, settle current deductibles from checking, retain receipts indefinitely, and leave the balance to compound. Pros: Captures federal income and FICA exemptions alongside multi-decade federal compounding for a portable retirement healthcare reserve with no mandatory annual distributions. Cons: Triggers annual California tax on dividends, interest, and realized gains, imposes manual cost-basis bookkeeping without Form 1099 support, and requires ample personal cash flow. People weigh this path when they have strong cash flow, have maxed out other retirement plans, and prioritize long-term federal sheltering over state simplicity.
- Spend HSA for Current Medical Expenses From Cash Reserves: Fund the HSA via payroll deductions for upfront federal tax breaks, keep balances in cash or money market funds, and reimburse medical bills as they occur. Pros: Eliminates California capital gains tracking and Schedule D schedules, provides immediate cash flow relief with federally pre-tax dollars, and produces negligible taxable interest. Cons: Forfeits decades of equity market compounding, fails to build a late-life healthcare reserve, and limits the HSA to an annual spending vehicle. People weigh this path when facing regular medical bills, tighter monthly cash flow, or reluctance to maintain manual state cost-basis logs.
- Invest Exclusively in California-Exempt U.S. Treasury Securities: Contribute the federal maximum through payroll and handle medical bills from checking, while allocating HSA holdings strictly to direct U.S. Treasury obligations or qualifying Treasury funds. Pros: Exempts interest from California income tax on Schedule CA (540), preserves federal deductions and compounding on interest, and reduces annual state reporting compared with dividend-heavy equities. Cons: Offers lower historical expected returns than diversified stocks, leaves realized capital gains on fund sales subject to California tax and basis tracking, and provides weaker inflation protection against healthcare costs. People weigh this path when seeking federal and state tax-exempt interest growth with lower administrative effort.
Relocation, Retirement Withdrawals, and Form 540NR
Tech employees who relocate out of California enter a different tax regime once they establish domicile in another state, though the transition year requires careful reporting. Under Franchise Tax Board instructions for Schedule CA (540NR), part-year residents and nonresidents allocate HSA interest, dividends, and capital gains according to the specific dates of California residency. Investment income received or gains realized before the move date remain taxable on the California nonresident return.
Moving to a state that conforms to federal HSA rules—or one with no personal income tax—stops future annual state tax drag on subsequent dividends, interest, and newly realized gains. However, relocating out of California does not retroactively erase or refund state taxes owed on income generated during prior years of California residency, nor does it exempt gains realized while the account holder was still domiciled in California.
Regardless of which state an account holder resides in during retirement, qualified medical distributions from an HSA remain free of federal income tax under IRS rules and free of California tax under state rules. Keeping itemized medical receipts from earlier working years allows retirees to withdraw funds cleanly against documented past expenses, even decades after leaving a California employer.
Non-medical withdrawals follow different federal and state rules later in life. Under IRS Publication 969, distributions not used for qualified medical expenses face ordinary federal income tax plus a 20% additional federal tax before age 65. Once the account beneficiary reaches age 65, that 20% federal penalty disappears, leaving only regular federal income tax on non-medical withdrawals, similar to traditional retirement accounts, while California imposes no 20% state penalty at any age.
- If you receive investment income before your move dateThose amounts remain taxable on the California nonresident return.
- If you move to a state that conforms to federal HSA rulesFuture annual state tax drag on subsequent earnings stops.
- If you owe state taxes on income generated during prior California residencyRelocating does not retroactively erase or refund those taxes.
How moving out of California affects the state taxation of your HSA investments.
Key takeaways
- Coordinating HSA contributions with a spouse enrolled in a separate non-qualifying health plan requires verifying whether the spouse carries a general-purpose flexible spending account, which can disqualify HSA eligibility for both individuals under federal rules.
- Under California community property principles, married residents filing separate state returns split HSA investment income and capital gains earned during marriage evenly across their respective returns unless separate-property rules apply.
- Naming a spouse versus a non-spouse beneficiary on an HSA alters federal tax outcomes at death: a surviving spouse treats the inherited account as their own HSA, whereas a non-spouse beneficiary includes the fair market value in federal taxable income in the year of death.
- Excess contributions above the annual federal limits—such as $4,400 for self-only coverage or $8,750 for family coverage in 2026—trigger recurring federal excise penalties unless removed with attributable earnings before the filing deadline, while California taxes those earnings in the year generated.
- Establishing the HSA prior to incurring medical expenses is essential under IRS Publication 969, because healthcare bills incurred before the account establishment date never qualify for federally untaxed reimbursement even when settled out of pocket.
Sources
- Internal Revenue Bulletin: 2025-21 (Rev. Proc. 2025-19) (https://www.irs.gov/irb/2025-21_IRB)
- Publication 969 (2025), Health Savings Accounts and Other Tax-Favored Health Plans (https://www.irs.gov/publications/p969)
- Franchise Tax Board Bill Analysis: AB 781 (https://www.ftb.ca.gov/tax-pros/law/legislation/2025-2026/AB781-032825.pdf)
- 2025 Instructions for Schedule CA (540) | FTB.ca.gov (https://www.ftb.ca.gov/forms/2025/2025-540-ca-instructions.html)
- 2025 Instructions for Schedule CA (540NR) | FTB.ca.gov (https://www.ftb.ca.gov/forms/2025/2025-540nr-ca-instructions.html)
- Franchise Tax Board Bill Analysis: AB 2384 (https://www.ftb.ca.gov/tax-pros/law/legislation/2019-2020/AB2384-021820.pdf)
12Questions
Frequently asked questions
Does California impose a penalty on HSA distributions used for non-medical expenses?
No. According to Franchise Tax Board analysis of AB 2384, California does not impose the 20% federal additional tax on non-qualified HSA distributions at any age. Furthermore, because California already taxed the original contributions and annual investment earnings inside the account, a non-medical withdrawal does not trigger double California income tax on previously taxed basis; only any previously untaxed basis or gain, such as from contributions made before moving to California, would be evaluated under state income rules.
How are HSA earnings taxed if an account holder moves from California to a state with no income tax like Washington or Texas?
During the year of relocation, Schedule CA (540NR) requires allocating interest, dividends, and realized capital gains based on exact California residency dates. Any dividends received or capital gains realized before establishing permanent domicile in Washington or Texas remain taxable to California. Once domicile shifts outside California, the Franchise Tax Board generally does not tax unrealized appreciation on publicly traded securities inside the HSA when those shares are later sold as a nonresident.
Can a California resident avoid state tax on HSA investments by holding municipal bond funds from other states?
No. California taxes interest earned on municipal bonds issued by other states and local governments outside California. To receive California personal income tax exemption on bond interest, a resident holds either direct U.S. government obligations, U.S. territory obligations, or bonds issued within California, and a mutual fund holding those securities is required to hold more than half of its assets in qualifying obligations at the close of each quarter to pass through state-exempt dividends. Capital gains realized when selling any municipal bond fund remain taxable in California.
What happens to California cost basis if an account holder executes a trustee-to-trustee HSA transfer between custodians?
The tax consequence depends on whether the transfer happens in kind or in cash. Liquidating shares inside the old HSA before transferring cash creates a taxable sale for California Schedule D (540) in that year, setting new basis on the repurchased holdings at the receiving custodian. Transferring existing shares in kind preserves the original California cost basis, though neither custodian tracks or transmits tax lot history because federal HSA rules require no Form 1099-B reporting.
Can a California resident execute a once-in-a-lifetime Qualified HSA Funding Distribution from an IRA without state tax penalties?
No. While federal law allows a one-time transfer from an IRA to an HSA subject to a full-year health-plan testing period, California does not conform to Internal Revenue Code Section 223. Under Franchise Tax Board analysis of AB 781, California treats the transfer as a taxable IRA distribution, adding the amount to state taxable income and applying a 2.5% California additional tax if the account holder has not reached the state's early-distribution age exception. Any basis created by taxing that transfer in California then forms part of the HSA's California cost basis.
Does an employer's cafeteria plan HSA contribution reduce California State Disability Insurance (SDI) tax?
No. Although cafeteria plan payroll deductions into an HSA are excluded from federal income tax as well as Social Security and Medicare taxes, California does not extend cafeteria plan exclusions to HSA contributions. As a result, payroll HSA contributions remain included in California personal income tax wages and in State Disability Insurance (SDI) taxable wages on Form W-2, meaning employees continue to see SDI withholding applied to those contributed dollars.
14Next step
Take the next step
If you want to talk this through, an advisor at the firm can help.
15Next step
Talk it through with the firm
When you would like to talk something through, book a free call or send a message.

You will speak with Tayeb Ayat, the firm’s founder. (888) 336-8586 · info@fenul.com


