1031 Exchange for a Farm or Ranch
Keep the ground working when the farm changes hands
Farmland and ranch land held for investment or used in a farming business qualify for a 1031 exchange into other like-kind U.S. real property. Barns, fences, silos and growing crops come along as real property. The home you live in on the farm does not qualify, and since 2018 machinery, equipment and livestock fall outside Section 1031 because they are not real property.
The farm sale allocation sheet: 5 items. The first is free on this page.
Updated November 13, 2026 by Private Exchange Group. 2 minute read. Not tax or legal advice.

The short version
- Farmland and ranch land used in farming or held for investment can be traded for other farmland or for city property.
- The farmhouse you live in is a personal asset, so its share of the price and basis must be split out from the farm.
- Machinery, equipment and livestock stopped qualifying on January 1, 2018, when Section 1031 was limited to real property.
- Shares in a mutual ditch, reservoir or irrigation company can count as real property when state law recognizes them that way.
When the farm no longer fits the family
Farm and ranch owners usually face a sale when the work, the next generation or the land's value changes the plan. A neighbor wants to buy, a developer makes an offer, or the owners are ready to stop operating. Selling outright puts a large gain on one year's tax return. An exchange lets the value move into land or property that fits what comes next.
Section 1031 applies to real property used in a trade or business or held for investment, and farming is a business. The Treasury regulations give city real estate for a ranch or farm as an example of a like-kind trade, and IRS Publication 225 uses a trade of farmland for a larger tract of farmland to explain the basis rules.
What on a farm counts as real property
Land, barns, fences, grain storage bins and silos count when permanently affixed, since the regulations name them among buildings and inherently permanent structures. Growing crops, plants and timber are real property while still unsevered from the land. Once harvested, the crop is no longer real property, even if it sits in a bin on the farm.
Irrigation company shares can be part of it. Stock in a mutual ditch, reservoir or irrigation company is treated as real property when the company fits the tax-exempt description in the Code and the state's highest court or a state statute recognizes the shares as real property.
Before closing or not at all
Three ways a property fails the test
You live in it
A home you live in is not held for investment, and Section 1031 does not cover it.
You bought it to resell
Property held mainly for sale, such as a flip or a builder's lots, is excluded.
It crosses the border or is not real estate
Real property in the United States and real property abroad are not like-kind. Stock, partnership interests and REIT shares are not real property.
General rules, not tax or legal advice.
What stays out of a farm exchange
The home is the first item to separate. Publication 225 says your home is a capital asset rather than farm business property, and a farm sale that includes the house you live in requires splitting the price and basis between the home and the rest. The home includes its immediate surroundings and outbuildings not used for business. Rev. Proc. 2005-14 explains how the home sale exclusion and an exchange work together when one property serves both uses.
Equipment and livestock come next. Section 1031 has reached only real property since January 1, 2018, and Publication 225 states that an exchange of machinery or equipment does not qualify. Livestock is not land or an improvement to land. Tractors, combines and herds sold with the farm are reported as regular sales.
One more item: a single-purpose livestock or horticultural structure, such as a confinement barn or greenhouse built for one use, is Section 1245 property under the Code. It may count as real property for the exchange and still carry ordinary income recapture, and Section 1245(b)(4) sets how much an exchange shelters.
Trades farm owners make and the next step
Talk to PEG before you sign a purchase agreement, especially if the sale includes the house, equipment or livestock. PEG works with your CPA on the split so the exchange documents match, and you can open an exchange once the plan is set.
- Farm for farm
- Selling a tract near town and buying more acres farther out keeps the operation going on more ground, the trade Publication 225 uses as its example.
- Farm into rentals
- Owners stepping back from farming trade land into rental houses, apartments or net lease property for income without daily fieldwork.
- Part of the land
- Selling one parcel to a neighbor or developer and exchanging only that parcel keeps the home place and the rest of the farm in the family.
- Not across borders
- Farmland outside the United States is not like-kind to U.S. farmland, so a trade into foreign land does not qualify under Section 1031.
Questions people ask
Can I 1031 my farm into a rental property in town?
Yes. Farmland used in your farming business is like-kind to a rental house, an apartment building or commercial property, because all are U.S. real property held for business or investment. The home, the equipment and the livestock included in the sale stay outside the exchange and are figured separately.
Can I trade my cattle and equipment along with the ranch in a 1031?
No. Since 2018 only real property qualifies, so cattle, horses, tractors and other equipment sold with the ranch are separate sales. The contract should allocate the price among the land and improvements, the livestock and the equipment, and your CPA should review that allocation before you sign.
Can I exchange farmland I rent out to a neighbor?
Yes. Farmland you lease to another farmer is held for investment or used in a rental business, and it qualifies the same way land you farm yourself does. Make sure any lease on the land you sell is handled in the contract, because the buyer may take it over or need it ended.
Do I lose the farmhouse exclusion if I do a like kind swap on the farm?
Not necessarily. Rev. Proc. 2005-14 lets the home sale exclusion and a 1031 exchange both apply when one property is used as a home and in a business, with the exclusion applied first. The house portion and the farm portion are figured separately, and your tax advisor sets the split.


Know where you stand before you close
Tell us when the sale closes and what you own. You will hear where you stand and what has to happen first.
- Whether the property qualifies
- Your 2 deadlines on a calendar
- What your closing agent needs
Asking commits you to nothing. It keeps the option open.
Keep reading
Sources
- IRS Publication 225, Farmer's Tax Guide
- 26 CFR 1.1031(a)-3, Definition of real property (Cornell LII)
- 26 CFR 1.1031(a)-1, Property held for productive use in trade or business or for investment (Cornell LII)
- IRS: Like-kind exchanges now limited to real property
- IRS: Internal Revenue Bulletin 2005-7 (Rev. Proc. 2005-14)
- 26 U.S.C. 1245, Gain from dispositions of certain depreciable property (Cornell LII)
