Can I Deduct Margin Interest to Buy a Home? The 90-Day Trace Rule

You generally cannot deduct margin interest used to buy a home. The IRS traces borrowed money to where it is actually spent, and once margin loan proceeds pay for a personal residence, the interest fails both tests that could have saved it: it isn’t investment interest because the money didn’t buy an investment, and it isn’t qualified mortgage interest because the loan is secured by your portfolio rather than the house. The result is non-deductible personal interest. You can, however, restructure the debt after the fact so that future interest qualifies.

Why the Deduction Fails

Federal tax law bars individuals from deducting personal interest unless it fits one of a handful of exceptions: trade or business interest, investment interest, passive activity interest, qualified residence interest, or student loan interest. Anything outside those buckets is non-deductible.1Office of the Law Revision Counsel. 26 USC 163 – Interest

Margin interest tied to a home purchase misses on both plausible exceptions. It can’t be investment interest, because the borrowed money didn’t buy stocks, bonds, or other income-producing property. It also can’t be qualified residence interest, because the tax code requires that deductible home acquisition debt be secured by the residence itself. A margin loan is secured by the securities in your brokerage account. The house is never pledged as collateral, so the loan doesn’t meet the legal definition of home acquisition indebtedness.1Office of the Law Revision Counsel. 26 USC 163 – Interest

The size of your portfolio doesn’t change this. Neither does the fact that you’re paying real interest to a brokerage. What controls the outcome is the use of the funds and the collateral behind the debt.

How the IRS Traces the Money

The Treasury’s temporary allocation regulation ties the tax character of interest to how the borrowed funds are used, not to what secures the loan or where it originated. A margin loan doesn’t automatically produce “investment interest” just because it came from an investment account. If the proceeds leave the account and pay a home seller, the interest is traced to that home purchase and treated as personal interest.2eCFR. 26 CFR 1.163-8T – Allocation of Interest Expense Among Expenditures (Temporary)

The 15-Day Rule

When borrowed money lands in an account that already holds other cash, tracing which dollars paid for what gets messy. The regulation offers a shortcut: any expenditure made within 15 days of depositing the loan proceeds can be treated as coming from those proceeds. So if you draw on your margin line and close on a house ten days later, the interest is traced to the home. The same 15-day window applies to loan proceeds received in cash.2eCFR. 26 CFR 1.163-8T – Allocation of Interest Expense Among Expenditures (Temporary)

Ordering Rule for Mixed Accounts

If your account holds both borrowed and unborrowed funds, the IRS applies a set order. Debt proceeds deposited into the account are treated as spent before any unborrowed money already sitting there and before amounts deposited later. The margin dollars go out the door first, whatever the reality of your cash flow.2eCFR. 26 CFR 1.163-8T – Allocation of Interest Expense Among Expenditures (Temporary)

That ordering can work against you. If you draw on margin around the same time you make unrelated withdrawals from the same account, the IRS may attribute the borrowed money to whichever expenditure came first. Keeping margin proceeds in a separate account and wiring them directly to the closing agent is the cleanest way to establish a paper trail that supports your intended allocation.

Converting Margin Debt Into Deductible Mortgage Debt

There is a workaround, but it requires putting a lien on the house. IRS Publication 936 states that a debt initially failing to qualify as home acquisition indebtedness, because it wasn’t secured by the home, can qualify later once the borrower records a proper security instrument against the property.3Internal Revenue Service. Publication 936, Home Mortgage Interest Deduction

In practice, that means refinancing the margin balance into a traditional mortgage or home equity loan where the lender files a lien against your house. From the date the home secures the debt forward, the interest may be treated as qualified residence interest. Interest paid earlier, while the loan was still secured only by your portfolio, stays non-deductible.

The 90-Day Window

Timing matters if you want the refinanced debt to count as acquisition debt rather than home equity debt. The IRS treats a mortgage as used to buy your home if you take it out within 90 days before or after the purchase date. Close on the house using margin funds, then refinance into a secured mortgage within 90 days, and the new debt can qualify as acquisition indebtedness from that point.3Internal Revenue Service. Publication 936, Home Mortgage Interest Deduction

Dollar Caps on Acquisition Debt

Even after converting the debt, the deduction has a ceiling. For loans originated after December 15, 2017, interest is deductible on up to $750,000 of acquisition debt, or $375,000 if married filing separately. Loans taken out before that date remain under the older $1,000,000 limit. The caps apply to the combined balance across your main home and one second home.1Office of the Law Revision Counsel. 26 USC 163 – Interest

When Part of the Margin Loan Bought Investments

Margin interest is deductible when the borrowed money buys or carries investments. Stocks, bonds, and other income-producing property all count, and the interest is reported as investment interest expense on Form 4952. The deduction is capped at your net investment income for the year, which includes interest, non-qualified dividends, short-term capital gains, and similar portfolio returns. Any excess carries forward to future years and can be deducted once you generate enough investment income to absorb it.4Internal Revenue Service. Form 4952, Investment Interest Expense Deduction5Internal Revenue Service. About Form 4952, Investment Interest Expense Deduction

This matters when you split a margin draw between purposes. Say you take $500,000 from your margin line, put $300,000 into new stock positions, and spend $200,000 on a down payment. The interest traces to each use proportionally. The 60% tied to stock purchases is deductible investment interest, subject to the net investment income cap. The 40% tied to the home is non-deductible personal interest, unless and until you refinance that portion into a home-secured loan.

Documenting the Trace

Since tracing controls the outcome, your records are what protect the position you take on the return. Keep brokerage and bank statements showing the date and amount of each margin withdrawal, the transfer to the closing or escrow agent, and the settlement statement from the home purchase. If you split proceeds between investments and a home purchase, document the exact amounts allocated to each use.6Internal Revenue Service. Managing Your Tax Records After You Have Filed

Vague records give the IRS room to reclassify the interest in the least favorable way. Underreporting resulting from a bad allocation can trigger a 20% accuracy-related penalty on top of the additional tax and interest. Hold onto the supporting records for at least three years after filing, and longer for anything tied to the home purchase itself.