How to Calculate Capital Gains Sale of Investment Property on Which Mortgage Is Owed?

When you sell investment property, all of your profits are subject to either capital gains tax or depreciation recapture tax, which is a special type of capital gains tax. Your tax gets calculated on the difference between your cost basis and your selling price. Any debt that you owe, such as the balance on your mortgage, will not affect your capital gains liability.

Your Cost Basis

Your cost basis isn't just the purchase price of your investment property. The initial cost is what you actually paid at the closing, including your closing costs. For example, if you bought a small apartment building for $1 million and paid $1,500 in title fees, $5,000 in attorney's fees, $2,000 in miscellaneous fees and $8,000 in inspection fees, your actual cost would be $1.0165 million. To that cost, add the cost of any improvements you made to the property. Improvements are anything that changes your property's use, increases its value or extends its useful life. Taking the apartment building as an example, a $50,000 roof and $115,000 in kitchen and bathroom renovations would count as improvements and increase your cost basis to $1.1815 million.

Depreciation and Basis

While you own your investment property, the tax code lets you claim a small portion of its cost basis every year as a depreciation write-off. Depreciation is an accounting tool that simulates the decline in value that accompanies the gradual deterioration of buildings (although in recent years, almost all property has actually gained value over time). When you sell it for more than the depreciated value, the IRS will want you to return a portion of the money that you saved by claiming depreciation. To properly calculate your capital gains liability, you will need to total all of the depreciation that you were legally entitled to claim, whether or not you actually claimed it.

Calculating Tax Liability

You owe capital gains taxes on the difference between your adjusted cost basis and your net selling price. If you, for example, sell your apartment building for $1.95 million and pay $105,000 in commission and $8,700 in closing costs, your net selling price is $1.8363 million. Subtracting your $1.1815 million cost basis gives you a taxable capital gain of $654,800. In addition, if you sell for a profit you will have to pay depreciation recapture taxes on all of your accumulated depreciation. If you claimed $320,000 in depreciation while you owned your building, you need to pay depreciation recapture tax on the all of the $320,000. If you sell for a loss, you will pay recapture tax on the difference between your net selling price and your depreciated basis. For example, if you sold the building for $925,000, you would have a capital loss, but since your depreciated basis would be $861,500 ($1.1815 million minus $320,000), you would pay recapture tax on the $63,500 difference.

Federal Tax Rates

Capital gains on assets that you hold for at least one year are considered long-term gains and taxed at 15 percent. But if you are married and your taxable income exceeds $479,000 or single and your income exceeds $425,800, the rate is 20 percent, as of publication. Short-term gains are taxed at your marginal income tax rate. In addition, depreciation recapture is taxed at 25 percent. You may also be subject to a 3.8 percent Medicare surtax if your income exceeds $200,000 if you are single or $250,000 if you are married. These rates went into effect for the 2013 tax year and will not change without new laws being passed. It's always a good idea to verify these rates with the IRS or your accountant.

Loans and Gains

What you pay off on your loan isn't tax deductible. However, you can amortize many of the costs of getting your loan over its life. For example, if you pay $12,000 to take out a mortgage with a 10-year term, you can write off $1,200 per year. If you were to sell your property after only three years, you'd have $8,400 in remaining loan fees that you hadn't claimed. You would be able to add those remaining fees to your cost basis, reducing your gain when you sold your property.

Video of the Day

Photo Credits

  • Hemera Technologies/ Images

About the Author

Steve Lander has been a writer since 1996, with experience in the fields of financial services, real estate and technology. His work has appeared in trade publications such as the "Minnesota Real Estate Journal" and "Minnesota Multi-Housing Association Advocate." Lander holds a Bachelor of Arts in political science from Columbia University.

Zacks Investment Research

is an A+ Rated BBB

Accredited Business.