Dear Liz: You recently answered a question about determining home sale profits for a widow. My question is how you calculate taxes when there’s a loan in the mix. For instance, when I bought my home, I took out a mortgage. Subsequently, I took out a second mortgage to pay for a pool and landscaping. I also refinanced several times, but never took a mortgage with cash out. Please advise me how to calculate my cost basis given these loans. Of course, you can broaden your response to include other loan scenarios and how they play into cost basis.