Tax & Legal

Capital Gains When Selling Farm Assets

Selling land, equipment or breeding stock can trigger several kinds of tax at once. Timing, structure and records decide how much is kept.

Updated November 19, 2026 · 6 min read · Tax, Estate and Legal Preparation

Selling part of a farm, or the whole thing, is a common step in succession and retirement. A retiring owner sells land to a child, sells equipment to a successor, sells cull cows and a herd, or sells acres to fund retirement or equalize heirs. Each sale may create taxable gain, and farm sales often involve more than one type of tax treatment in a single transaction. Land may produce long-term capital gain. Machinery may produce ordinary income from depreciation recapture. Breeding livestock may follow special rules. State tax may add to the bill. And how the sale is structured, including timing and installment terms, can change when and how much tax is paid. This article explains the main ideas in general terms. Tax law changes and details matter, so work with a CPA before signing any sale contract. This is education, not tax advice.

The basic calculation

Gain is generally sale price minus adjusted basis, minus selling costs. If you sell for more than basis, you have gain, and the character of that gain depends on the asset and how long you held it.

  • Long-term capital gain: gain on capital assets held for more than a year, generally taxed at preferential rates.
  • Short-term gain: gain on assets held a year or less, taxed at ordinary rates.
  • Ordinary income: includes recapture of depreciation on certain property, inventory sales and some other items.

Rates and thresholds change, so check the IRS and your CPA for current rules. See the IRS and IRS basis publication.

Land

Farmland held for investment or use in a farm business is typically a long-term capital asset or a business-use asset. Gain on sale is generally long-term capital gain. Basis is original cost plus capital improvements, which may be low if land was acquired long ago or inherited at an old value. See stepped-up basis and farm transfers.

Points to consider:

  • Records of purchase and improvements, such as tile, clearing and fencing where capitalized
  • Whether any portion has been depreciated, such as buildings and land improvements
  • Allocation of price between land, buildings and other assets, which affects tax
  • Deferred payments through installment sales
  • State capital gains tax or other state taxes
  • Recapture or rollback of special use valuation or use-value assessment programs, if land is sold or changes use
  • Easements sold or donated

Buildings and improvements

Buildings, grain bins, fences and other improvements may have been depreciated. Sale can trigger recapture. For buildings, special recapture rules apply to some real property. The allocation of price among components should be supported by an appraisal or reasonable basis.

Machinery and equipment

Equipment is often fully or largely depreciated, with low or zero basis. Selling it for market value can generate ordinary income to the extent of prior depreciation, called Section 1245 recapture. Many farmers have used accelerated depreciation or expensing provisions, which can increase recapture. This is a significant surprise to families who assume all gain is capital gain. See depreciation and asset records and valuing farm machinery and equipment.

Breeding livestock

Breeding, dairy and draft animals held for use in the business may qualify for treatment similar to business property, with possible capital gain on the sale of animals held long enough, subject to rules and depreciation recapture. Raised animals typically have little basis. Sales of animals held for sale to customers are ordinary income. Cull animals follow their own rules. Holding periods differ by species. Ask your CPA about your herd. See valuing livestock and breeding herds.

Crops, grain and inventory

Sales of crops, feed and market livestock are generally ordinary income. If a farm sells at retirement, there may be a large amount of ordinary income from inventory in one year. Timing and cash-method accounting can matter. Plan the sale date and bookkeeping with your CPA.

Installment sales

An installment sale allows a seller to report gain as payments are received over time, rather than all in the year of sale, if requirements are met. This can spread tax and reduce the bite in a single year. Interest on the note is taxed as income. Depreciation recapture generally must be reported in the year of sale, even if payments are deferred. Related-party rules and resale rules can limit benefits if a family member buys and quickly resells. See installment sales and contracts for farm transfers.

Like-kind exchanges and reinvestment

Under current federal law, tax-deferred exchanges of real property for like-kind real property can be possible, including exchanges of farmland, with strict rules on timing, intermediaries and identification. Exchanges of equipment and livestock are generally not eligible under current rules. Because these rules are technical and have changed over time, consult a CPA and qualified intermediary before relying on an exchange.

Sales to family

A sale to a family member must be at a fair price to avoid gift implications, or the difference may be treated as a gift. Related-party rules can affect installment treatment and depreciation. See selling the farm to a family member and farm gift tax and the annual exclusion.

Selling to a beginning farmer

Some states offer tax incentives for selling or leasing to a beginning farmer, such as credits or reduced rates. Programs vary widely. Ask your state agriculture department or Extension, and see your state page. See retiring farmers selling to a new farmer.

State taxes

States may tax gains as ordinary income, have separate capital gains rules, offer exclusions for farm sales or impose transfer taxes. Check your state's rules and confirm with a local CPA.

Timing

  • Selling in a year with lower other income may reduce tax.
  • Spreading sales over multiple years can reduce rate impact.
  • Death changes basis rules, so timing relative to estate planning matters.
  • Sales near year-end require attention to closing dates.
  • Changes in law can affect timing decisions, so avoid decisions based only on rumors.

Records to gather before a sale

  • Purchase documents, closing statements and surveys
  • Depreciation schedules and prior tax returns
  • Records of improvements
  • Appraisals and valuation reports
  • Leases and easements
  • Loan payoff statements
  • Allocation worksheets of price among assets

Use the tax basis records checklist.

Planning approaches that may help

  • Compare selling with gifting, leasing or holding until death. See gift and sale transfer comparison.
  • Use installment sales to spread income.
  • Allocate price carefully among assets.
  • Coordinate with retirement income needs. See income sources for retired farmers.
  • Consider charitable strategies if you have charitable goals.
  • Model scenarios with a CPA, including state tax.

Mistakes to avoid

  • Signing a sale contract before talking to a CPA
  • Ignoring depreciation recapture
  • Mis-allocating price among assets
  • Forgetting state tax and transfer taxes
  • Relying on old basis assumptions
  • Not keeping records

A short example

A retiring couple sells equipment and a share of land to their son under a ten-year contract. Their CPA allocates price among land, buildings and machinery based on an appraisal, reports recapture on machinery in the first year, and reports land gain under the installment method over the contract term. The son's basis equals the purchase price, giving him depreciation on equipment and buildings. The couple's retirement income is stable and tax is spread. They review each year with the CPA.

For a lighter close, FARM.FM agribusiness and satire are the places to look for jokes about taxes that are nearly as old as farming itself.

Frequently asked questions

Is all gain on farmland taxed at capital gains rates?

Generally land held long-term produces capital gain, but depreciation recapture, state tax and other rules can apply to parts of the sale.

Can I defer tax by selling over several years?

Often yes through installment sales, but depreciation recapture is generally reported upfront.

Can I do a 1031 exchange on equipment?

Under current law, generally not. Real property exchanges may qualify. Ask a CPA.

Does selling to my child change the tax?

Related-party rules and fair price requirements apply. Get professional advice.

Worksheets that go with this article

Stepped-Up Basis and Farm TransfersPrevious articleFarm Wills and Trusts ExplainedNext article

Official information and verification

Program rules, dates and prices change. Confirm current details with the agencies themselves. These links are for independent verification, not endorsements.

Educational content only. This article is not insurance, legal, tax, veterinary, investment or safety advice. Talk with a licensed insurance agent, lender, attorney, tax professional, veterinarian or safety professional about your own operation.