1. First, determine your selling costs. There is a great tip about accounting for all selling costs and you can read it here:
Assuming you sold a property for $200K and you paid 6% commission ($12K) plus other closing costs that added to $6K, your selling costs are
$18K (Selling Costs) = $12K (Commission) + $6K (Closing costs)
2. Second, you calculate the adjusted cost basis of your property. A simple formula for calculating adjusted cost basis is
Adjusted Cost Basis = Purchase price – Depreciation + Improvements
Assuming that you had bought the property for $95K and paid closing costs of $5K that you added to increase the basis, your purchase price is $100K.
Go and look up the depreciation that you have taken on your tax return for this property and the improvements done to the property. Assume in this case you had taken $30K of depreciation and have done $10K of improvements.
The adjusted cost basis of this property is:
$80K (Adjusted Cost Basis) = $100K (Purchase Price) – $30K (Depreciation) + $10K (Improvements)
3. Third, the gain or loss on the sale of this invest property is calculated using the formula:
$102K (Gain) = $200K (Sale Price) – $18K (Selling Costs) – $80K (Adjusted Cost Basis)
4. Finally, the amount taxed at capital gains rate of 5% or 15% is calculated by subtracting depreciation from gain:
$72K Taxed at Capital gains rate of 5% or 15%
$30K Depreciation (Generally taxed at 25% rate)
In this example, an investor pays $11,100 (if 5% capital gains tax rate) or $18,300 (if 15% capital gains tax rate) in taxes on a $102K gain. By accounting for all selling costs and improvements, the investor saved from $3K to $5K in taxes depending upon their tax bracket.

