Do you pay capital gains selling investments to buy a house?
Trying to figure out if the reason you sell stocks matters for taxes. I have a brokerage account with some index funds I've held for about 3 years and want to sell them to put together a down payment on a house. Total gain would be maybe $40k above what I paid. I know there's a capital gains exclusion when you sell a home you lived in, but does that apply here? Or is it only about the house you're selling, not what you're buying? I already looked at Schedule D and Form 8949 and I see where the gains go, but I can't find anything that says the purpose of the sale changes anything. Someone at work told me you can avoid the tax if you're buying a primary residence. That doesn't sound right to me but I wanted to ask here before I do anything.