Guide

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.

Updated October 18, 2026

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

OptionHow it works
1031 exchangeFarmland 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 saleCommon when selling to a neighbor or a family member; gain is taxed as payments come in (IRC §453)
Conservation easementDonating development rights can give a charitable deduction (IRC §170(h)); needs specialized advisors
Holding until deathHeirs generally get a basis equal to value at death (IRC §1014); see capital gains on inherited property
Opportunity Zone fundInvest 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?

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?
Farmland used in a farming business and held more than a year is generally §1231 property, so net gain is usually taxed like long-term capital gain. The land itself isn't depreciated, but machinery, grain bins and single-purpose agricultural structures are §1245 property, and gain up to their depreciation is ordinary income (IRC §1231; IRC §1245; IRS Publication 225).
How can a farmer avoid capital gains tax on farmland?
Common options are a 1031 exchange into other real property (farm for farm, or farm for other investment real estate), an installment sale, a conservation easement donation, holding the land so heirs get a basis step-up, and investing eligible gain in a qualified opportunity fund within 180 days. Each has trade-offs.
Is farmland in an Opportunity Zone worth more?
Not automatically. A rural tract in an Opportunity Zone may draw fund buyers who plan to develop or operate a business on it, but land bought mainly to hold for appreciation doesn't qualify for the fund. Price should still come from comparable sales.
What is the rural Opportunity Zone bonus?
Under Public Law 119-21, investors in a qualified rural opportunity fund get a 30% basis step-up after five years instead of 10%, and rural property needs a lower 50% improvement to meet the substantial improvement test.

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