I have about $500k in Vanguard funds, in a regular (i.e. taxable, non-retirement) account. I've been building these positions over the past 12 years or so.

There's a chance that I'll want to buy an apartment or house in the next few years, and I'll likely have to sell some of these for the down payment (I do have some cash, as well as a tax-free bond fund that I assume would be better to liquidate first, but I'll still need more money than that). I'm wondering if there's anything I can do about my tax bill - either preemptively, or at the time of liquidation.

Things I'm thinking of include:

  • selling the higher priced shares (possibly at a loss even) - I think it's ok to do that, and it doesn't necessarily have to be FIFO?
  • any potential writeoffs related to buying a home that can offset capital gains?
  • selling other investments for a capital loss to offset this sale?
  • anything related to retirement accounts? e.g. I think I recall being able to take a loan from your retirement account in order to buy a home

But any other ideas would be appreciated - thanks!

  • Interesting, that's exactly the type of thing I'm looking for (i.e. something I'd never think of myself). Maybe out of scope here, but how does the 2nd mortgage work in this situation?
    – Jer
    May 21, 2013 at 17:50

3 Answers 3


Don't let tax considerations be the main driver. That's generally a bad idea. You should keep tax in mind when making the decision, but don't let it be the main reason for an action.

selling the higher priced shares (possibly at a loss even) - I think it's ok to do that, and it doesn't necessarily have to be FIFO?

It is OK to do that, but consider also the term. Long term gain has much lower taxes than short term gain, and short term loss will be offsetting long term gain - means you can lose some of the potential tax benefit.

any potential writeoffs related to buying a home that can offset capital gains?

No, and anyway if you're buying a personal residence (a home for yourself) - there's nothing to write off (except for the mortgage interest and property taxes of course).

selling other investments for a capital loss to offset this sale?

Again - why sell at a loss?

anything related to retirement accounts? e.g. I think I recall being able to take a loan from your retirement account in order to buy a home

You can take a loan, and you can also withdraw up to 10K without a penalty (if conditions are met).

Bottom line - be prepared to pay the tax on the gains, and check how much it is going to be roughly. You can apply previous year refund to the next year to mitigate the shock, you can put some money aside, and you can raise your salary withholding to make sure you're not hit with a high bill and penalties next April after you do that.

As long as you keep in mind the tax bill and put aside an amount to pay it - you'll be fine. I see no reason to sell at loss or pay extra interest to someone just to reduce the nominal amount of the tax. If you're selling at loss - you're losing money. If you're selling at gain and paying tax - you're earning money, even if the earnings are reduced by the tax.

  • My thinking about selling for a loss was that if the proceeds are going to be the same (i.e. I'm still going to be selling X number of shares at their current price), I could sell the higher priced ones so I wouldn't owe any capital gains now. I realize I'd just be delaying paying the tax to whenever I end up selling the shares with the lower cost basis - I'm not sure if that's a good idea or not.
    – Jer
    May 21, 2013 at 20:31
  • +1 even though you did not use one of my favorite lines - "don't let the tax tail wag the investing dog." You were close enough. May 21, 2013 at 20:52

Have you changed how you handle fund distributions? While it is typical to re-invest the distributions to buy additional shares, this may not make sense if you want to get a little cash to use for the home purchase. While you may already handle this, it isn't mentioned in the question.

While it likely won't make a big difference, it could be a useful factor to consider, potentially if you ponder how risky is it having your down payment fluctuate in value from day to day. I'd just think it is more convenient to take the distributions in cash and that way have fewer transactions to report in the following year. Unless you have a working crystal ball, there is no way to definitively predict if the market will be up or down in exactly 2 years from now. Thus, I suggest taking the distributions in cash and investing in something much lower risk like a money market mutual fund.

  • Everything's reinvested. I guess I could take it as cash but does that make a big difference? On average if the market goes up, I should leave it invested, even if that means paying capital gains tax on the additional gains, no?
    – Jer
    May 21, 2013 at 20:32

If you need less than $125k for the downpayment, I recommend you convert your mutual fund shares to their ETF counterparts tax-free:

Can I convert conventional Vanguard mutual fund shares to Vanguard ETFs?

Shareholders of Vanguard stock index funds that offer Vanguard ETFs may convert their conventional shares to Vanguard ETFs of the same fund. This conversion is generally tax-free, although some brokerage firms may be unable to convert fractional shares, which could result in a modest taxable gain. (Four of our bond ETFs—Total Bond Market, Short-Term Bond, Intermediate-Term Bond, and Long-Term Bond—do not allow the conversion of bond index fund shares to bond ETF shares of the same fund; the other eight Vanguard bond ETFs allow conversions.)

There is no fee for Vanguard Brokerage clients to convert conventional shares to Vanguard ETFs of the same fund. Other brokerage providers may charge a fee for this service. For more information, contact your brokerage firm, or call 866-499-8473.

Once you convert from conventional shares to Vanguard ETFs, you cannot convert back to conventional shares. Also, conventional shares held through a 401(k) account cannot be converted to Vanguard ETFs.


Withdraw the money you need as a margin loan, buy the house, get a second mortgage of $125k, take the proceeds from the second mortgage and pay back the margin loan.

Even if you have short term credit funds, it'd still be wiser to lever up the house completely as long as you're not overpaying or in a bubble area, considering your ample personal investments and the combined rate of return of the house and the funds exceeding the mortgage interest rate. Also, mortgage interest is tax deductible while margin interest isn't, pushing the net return even higher.


Generally, I recommend this figure to you because the biggest S&P collapse since the recession took off about 50% from the top. If you borrow $125k on margin, and the total value of the funds drop 50%, you shouldn't suffer margin calls.

I assumed that you were more or less invested in the S&P on average (as most modern "asset allocations" basically recommend a back-door S&P as a mix of credit assets, managed futures, and small caps average the S&P).

Second mortgage

Yes, you will have two loans that you're paying interest on.

You've traded having less invested in securities & a capital gains tax bill for more liabilities, interest payments, interest deductions, more invested in securities, a higher combined rate of return.

If you have $500k set aside in securities and want $500k in real estate, this is more than safe for you as you will most likely have a combined rate of return of ~5% on $500k with interest on $500k at ~3.5%. If you're in small cap value, you'll probably be grossing ~15% on $500k.

You definitely need to secure your labor income with supplementary insurance. Start a new question if you need a model for that.

Secure real estate with securities

A local bank would be more likely to do this than a major one, but if you secure the house with the investment account with special provisions like giving them copies of your monthly statements, etc, you might even get a lower rate on your mortgage considering how over-secured the loan would be.

You might even be able to wrap it up without a down payment in one loan if it's still legal. Mortgage regulations have changed a lot since the housing crash.

  • 1
    Interesting. A couple questions: why $125k (maybe I'm just missing that somewhere)? And I'm still a little unclear on how it would work then with two mortgages. Let's assuming a $500k house. So I would take the loan to cover the downpayment (say $100k). Then the "normal" mortgage would cover the remaining $400k. Then I would take a second mortgage for $100k, and pay back the loan with that. But now I'll just have two loans (i.e. the mortgages) that I'm paying interest on, right? Am I just trading paying capital gains tax for paying mortgage interest?
    – Jer
    May 21, 2013 at 20:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .