
Short answer
Farmland and ranchland are real property, so they can be exchanged for any other U.S. real estate held for business or investment: another farm, a net-lease store, an apartment building or a vacation rental. The hard part is that a farm sale is several sales in one. The land, barns and other permanent structures can go into a 1031 exchange. The farmhouse you live in may qualify for the home sale exclusion instead. Equipment, livestock and harvested crops are taxed, because personal property no longer qualifies. Water rights and other interests depend on state law. The steps below start with sorting those pieces.
| Asset | Treatment |
|---|---|
| Cropland, pasture, timberland | 1031 exchange |
| Barns, sheds, permanent fences, wells, drainage tile | Usually 1031, as permanent improvements |
| Your farmhouse and the land around it | §121 home sale exclusion, if you lived there 2 of the last 5 years |
| A rented-out second house on the farm | 1031 exchange |
| Water rights | 1031 if state law treats them as real property |
| Ditch company shares | 1031 only if state law treats them as real property |
| Mineral rights | Often 1031; see mineral rights |
| Tractors, combines, irrigation pivots that can be moved | Taxed, with depreciation recapture |
| Livestock, stored grain, harvested crops | Taxed |
On this page
The seven steps
- Inventory and value the assets. Use the table above. Get an appraisal that splits land, improvements, the home and equipment, because each split changes your tax.
- Decide on the farmhouse. If you live there, the home and a reasonable amount of surrounding land can use the §121 exclusion, up to $250,000 of gain, or $500,000 for a married couple filing jointly. Rev. Proc. 2005-14 allows a single sale to use both §121 for the home and §1031 for the business part.
- Hire a qualified intermediary before closing. Sign the exchange agreement and assign the contract. Once you receive the sale money, it's too late.
- Write the allocation into the purchase agreement. State the price for real estate, the home, and equipment or livestock separately.
- Close the sale. The real estate share goes to the QI; the home share and equipment share come to you.
- Identify replacement property by day 45. In writing, using the three-property rule or another identification rule. See identification rules.
- Close on the replacement by day 180. Buy at least the net real estate share and replace any debt paid off.
Worked example: a 640-acre ranch
| Piece | Price | Treatment |
|---|---|---|
| Land, barns, corrals, wells | $3,500,000 | Into the 1031 exchange |
| Ranch house and 5 acres (owners' home for 20 years) | $450,000 | §121: up to $500,000 of gain excluded for a married couple |
| Equipment | $250,000 | Taxed; mostly ordinary income from recapture |
| Cattle | $180,000 | Taxed under the livestock rules |
| Total | $4,380,000 |
The owners send $3,500,000, less its share of selling costs, to the QI and buy a mix of replacement properties. The home sale is likely tax-free. Only the equipment and cattle are taxed now. The IRS's farm tax guide, Publication 225, covers sales of farm property and livestock.
Three replacement paths compared
| Another farm or ranch | Commercial net-lease property | Vacation rental | |
|---|---|---|---|
| Good for | Staying in agriculture, expanding or moving | Retiring from operations; steady rent | Rental income in a resort area, with limited family use |
| Work required | High | Low | Medium, or a manager |
| Income | Crop or cattle prices and weather | Contractual rent, often with increases | Seasonal, varies |
| Main risk | Commodity prices | Tenant credit and lease term | Personal use rules and seasonality |
| Rules to know | Value of land vs. home and equipment | Debt replacement | Personal use limits below |
Ranch to commercial. Pros: no daily operations, predictable rent, easier to divide among heirs later. Cons: you give up land that may keep appreciating, and a single tenant's departure can stop income. A DST is a fully passive option for part of the proceeds. See triple-net lease exchanges.
Ranch to vacation rental. A vacation home qualifies only if it is mainly an investment. Under the safe harbor in Rev. Proc. 2008-16, hold it for 24 months after the exchange, rent it at fair rent for at least 14 days in each of those years, and limit personal use to 14 days or 10% of the days rented, whichever is greater. See Airbnb and vacation rental exchanges and second homes.
Legal and practical checklist
| Item | Why it matters |
|---|---|
| Survey and legal description that separates the home site if needed | Supports the §121 and §1031 split |
| Title search for reserved minerals, easements and water rights | Shows exactly what you are selling and buying |
| Agricultural tax status and any rollback taxes on a change of use | Rules vary by state and county |
| Farm program contracts and leases with tenants | Who keeps payments after the sale |
| Selling to a child or relative | Related-party rules apply; see buying from family |
| Ownership entity and family members' shares | The same taxpayer must sell and buy |
| Conservation easement offers | A permanent easement may be exchangeable; get tax and legal advice first |
Animals raise their own questions; see horses in a 1031 exchange. For land with no buildings, see vacant land exchanges and raw land pitfalls. State-specific notes are in our Montana and Texas guides. Talk through your farm sale: book an intro call.
Frequently asked questions
Can you do a 1031 exchange on farmland?
Yes. Farmland and ranchland are real property and can be exchanged for any U.S. real estate held for business or investment.
Can I exchange my farm for commercial property?
Yes. Farmland is like-kind to commercial property, rentals and other investment real estate.
What about the farmhouse I live in?
The home and its surrounding land can use the §121 home sale exclusion if you lived there 2 of the last 5 years. Rev. Proc. 2005-14 lets you combine it with a 1031 exchange for the rest of the farm.
Can farm equipment be part of a 1031 exchange?
No. Since 2018 only real property qualifies. Equipment and livestock are taxed when sold.
Do water rights qualify for a 1031 exchange?
They can, if state law treats them as real property. Ditch company shares qualify only if state law treats them as real property.
Sources
- IRS Publication 225, Farmer's Tax Guide (farm property sales and livestock)
- Treas. Reg. §1.1031(a)-3 (real property definition, water rights and ditch shares)
- Rev. Proc. 2005-14 (combining §121 and §1031 in one sale)
- Rev. Proc. 2008-16 (vacation home safe harbor)
- 26 U.S.C. §121 (home sale exclusion)
- 26 U.S.C. §1245 (recapture on equipment)
This article is general information, not tax or legal advice. Talk to your CPA or tax attorney about your situation.

















