Report

Help us improve this tool

Gain on Sale Calculator

Calculate the gain or loss from selling an asset using the gain on sale formula with support for adjusted basis, depreciation recapture, and capital gains analysis.

L ading . . .

What Is a Gain on Sale Calculator?

A gain on sale calculator helps real estate investors, business owners, and individual taxpayers determine the profit or loss from selling a capital asset such as property, equipment, or investments. It computes the difference between the sale price and the adjusted basis of an asset.

The gain on sale formula is GOS = SP - AB, where SP is the sale price and AB is the adjusted basis. A positive result is a taxable gain, while a negative result is a deductible loss (subject to IRS limitations).

How to Use the Gain on Sale Calculator

Select what you want to calculate from the dropdown: Gain on Sale (when you know sale price and adjusted basis), Sale Price (when you know desired gain and adjusted basis), or Adjusted Basis (when you know sale price and gain). Enter the known values and the calculator will compute the unknown amount.

For example, if you sell a property for $400,000 with an adjusted basis of $310,000, the gain on sale is $90,000. If you want a specific gain, enter your target and the calculator tells you the required sale price.

Understanding Adjusted Basis

The adjusted basis is not simply what you paid for the asset. It starts with the original cost, adds capital improvements, and subtracts accumulated depreciation:

AB = Original Cost + Improvements - Depreciation

  • Original cost — what you paid for the asset, including certain closing costs
  • Capital improvements — renovations, additions, new systems that add value or extend useful life
  • Depreciation — the amount of depreciation you have claimed (or could have claimed) on the asset

Capital Gains Tax Considerations

The tax treatment of your gain depends on how long you held the asset:

  • Short-term gains (assets held 1 year or less) — taxed as ordinary income at your marginal tax rate
  • Long-term gains (assets held more than 1 year) — taxed at preferential rates of 0%, 15%, or 20% depending on your income

For real estate, depreciation recapture applies — the IRS taxes the depreciation you claimed at up to 25%, separate from the remaining capital gain.

Frequently Asked Questions

How do you calculate profit from selling a property?

Subtract the adjusted basis from the sale price using GOS = SP - AB. The adjusted basis is your purchase price plus capital improvements minus accumulated depreciation. A positive result is your profit (gain), while a negative result is a loss.

Are improvement costs included when calculating gain on sale?

Yes. Capital improvements increase your adjusted basis, which reduces the taxable gain. For example, a $30,000 kitchen renovation added to a $200,000 purchase gives you a $230,000 basis before depreciation. Only improvements that add value or extend the property's useful life count — routine maintenance does not.

What is depreciation recapture on real estate?

When you sell a depreciated asset for more than its adjusted basis, the IRS recaptures the depreciation you claimed. This portion is taxed at up to 25%, not the lower long-term capital gains rate. Recapture applies to the lesser of total depreciation taken or gain realized.

Can you avoid capital gains tax on real estate?

A 1031 exchange lets you defer capital gains by reinvesting proceeds into a like-kind property within 180 days. The primary residence exclusion allows up to $250,000 ($500,000 for married couples) in tax-free gains if you lived in the home for at least two of the last five years.

How does adjusted basis differ from original cost?

Original cost is simply what you paid. Adjusted basis starts with the original cost, adds capital improvements, and subtracts accumulated depreciation. Closing costs paid at purchase (title insurance, recording fees) can also be added to the basis.