Capital Gains Tax on Farmland: What Agents Should Know, Including Rural Opportunity Zones
Capital gains tax on farmland, for agents: §1231 treatment, recapture on bins and machinery, 1031 and installment sales, and where rural Opportunity Zones fit.
Farmland sales are often the largest transaction of a family’s life, and the land may have been owned for generations. That means large gains, family decisions, and timing pressure. This guide gives agents the tax basics for farmland and shows where rural Opportunity Zones fit.
It’s part of our series for agents. The hub is OZ talking points for your next listing appointment.
How farmland is taxed
- The land. Farmland used in a farming business and held more than a year is generally §1231 property, so net gain is usually taxed at long-term capital gain rates of 0%, 15% or 20% (IRC §1231; IRC §1(h)). Land isn’t depreciated, so there’s no recapture on it.
- Machinery, grain bins and single-purpose structures. These are §1245 property; gain up to their depreciation is ordinary income (IRC §1245(a)(3)).
- Farmhouse. If the seller lives on the farm, the house and some land around it may qualify for the home sale exclusion. See the Section 121 home sale exclusion.
- Rented-out farmland held by a landowner who doesn’t farm is usually investment property, with capital gain on the land.
- Net investment income tax of 3.8% can apply to some sellers, depending on income and whether the seller materially participates in the farm (IRC §1411).
The farm-specific rules are in IRS Publication 225, the Farmer’s Tax Guide.
Ways to defer or reduce the tax
| Option | How it works |
|---|---|
| 1031 exchange | Farmland is like-kind to other real property, so a farm can be exchanged for another farm or for other investment real estate (IRC §1031). Equipment doesn’t qualify. |
| Installment sale | Common when selling to a neighbor or a family member; gain is taxed as payments come in (IRC §453) |
| Conservation easement | Donating development rights can give a charitable deduction (IRC §170(h)); needs specialized advisors |
| Holding until death | Heirs generally get a basis equal to value at death (IRC §1014); see capital gains on inherited property |
| Opportunity Zone fund | Invest an amount equal to the eligible gain in a qualified opportunity fund within 180 days (IRC §1400Z-2) |
Compare a 1031 and an Opportunity Zone fund on the seller’s numbers with the 1031 vs DST vs Opportunity Zone calculator, and find the last day to invest with the 180-day deadline calculator.
Where rural Opportunity Zones fit
Many farm tracts are rural, and OZ 2.0 adds two rural rules under Public Law 119-21 §70421:
- For the seller’s gain: investors in a qualified rural opportunity fund get a 30% basis step-up after five years, instead of 10%, for investments on or after January 1, 2027. The Opportunity Zone tax benefits guide explains the three benefits, and the rural OZ bonus explains what counts as rural.
- For a fund buyer: rural property needs only a 50% improvement to meet the substantial improvement test. Land itself doesn’t have to be doubled, but it must be used in the fund’s business, not held for appreciation. See selling land or property to opportunity funds.
To see whether a farm sits in an eligible or nominated OZ 2.0 tract, run the address in the OZ 2.0 likelihood checker or open the Opportunity Zone map. Treasury hasn’t certified any state’s OZ 2.0 list yet, so date what you record.
Questions to ask a farmland seller
- Who owns the land: individuals, a family partnership, a trust, or an estate?
- Is it farmed by the owner or rented out?
- What equipment, bins or buildings convey, and how will the price be allocated?
- Is part of the farm the seller’s home?
- Does the family want to keep owning land (a 1031), receive payments (an installment sale), or reinvest elsewhere?
Related reading
- Capital gains tax on a land sale, and selling to opportunity funds
- Capital gains tax on investment property
- Rural Opportunity Zone map: how to find rural OZ tracts
- OZ talking points for agents (series hub)
Sources: IRS Publication 225; IRC §1231; IRC §1245; IRC §1; IRC §1411; IRC §1031; IRC §453; IRC §170; IRC §1014; IRC §1400Z-2; Public Law 119-21.
Not tax advice.
Frequently asked questions
How is the sale of farmland taxed?
How can a farmer avoid capital gains tax on farmland?
Is farmland in an Opportunity Zone worth more?
What is the rural Opportunity Zone bonus?
Get the OZ 2.0 Investor Guide
One email when major OZ 2.0 events happen — Treasury guidance, state filings, rule changes. Unsubscribe anytime.
Tools: 1031 vs DST vs Opportunity Zone calculator · Basis step-up and 10-year rule calculator · OZ 2.0 likelihood checker · all Opportunity Zone tools