How Is Capital Gains Tax on Farmland Calculated?
Capital gains tax on farmland equals your amount realized (sale price minus selling costs) minus your adjusted basis, with the resulting gain split into up to three federal layers: ordinary-rate recapture on depreciated equipment, drainage tile, and grain bins under Section 1245; a maximum 25% rate on depreciation claimed on barns and other farm buildings under Section 1250; and the 0%, 15%, or 20% long-term capital gains rate on everything else, plus the 3.8% net investment income tax where it applies. For a high-value sale, the top all-in federal rate on the long-term portion is 23.8% (20% plus the 3.8% net investment income tax) before state tax is added.
Selling farmland held for decades is rarely one calculation. It is three or four calculations stacked on top of each other, and the sellers who treat it as a single number routinely overpay or underprepare. A $4 million sale of inherited land and a $4 million sale of long-held purchased land can produce federal tax bills more than half a million dollars apart, as the worked example below shows. This guide walks through the 2026 rates, the basis rules that drive everything, the recapture layers, and the deferral and exclusion strategies that actually hold up under IRS Publication 544 and Publication 225, the Farmer's Tax Guide.
What Capital Gains Rate Applies to a Farmland Sale in 2026?
Farmland held more than one year and used in a farming business or held for investment gets long-term capital gain treatment on sale, taxed at 0%, 15%, or 20% depending on taxable income. For 2026, the 0% long-term capital gains rate applies up to $49,450 (single) / $98,900 (married filing jointly), and the 20% rate applies above $545,500 / $613,700, per Rev. Proc. 2025-32. A seven-figure farmland gain lands almost entirely in the 20% bracket regardless of your other income, because the gain itself fills the brackets.
Farmland used in a farming business is technically Section 1231 property: net gains are taxed as long-term capital gains, while net losses are fully deductible against ordinary income, a one-way ratchet that favors the seller. The rates below apply to the capital gain portion after the recapture layers covered later.
| Filing status | 0% rate up to | 15% rate | 20% rate above |
|---|---|---|---|
| Single | $49,450 | $49,451 to $545,500 | $545,500 |
| Married filing jointly | $98,900 | $98,901 to $613,700 | $613,700 |
| Head of household | $66,200 | $66,201 to $579,600 | $579,600 |
2026 thresholds per Rev. Proc. 2025-32, Section 3.03. Thresholds are taxable income including the gain itself.
Two other federal layers sit alongside these rates. Unrecaptured Section 1250 gain (depreciation recapture on real estate) is taxed at a maximum 25%. Section 1245 recapture on tile, bins, and equipment is taxed at ordinary rates, which reach 37% for 2026 taxable income above $640,600 (single) / $768,700 (married filing jointly).
Does the 3.8% Net Investment Income Tax Apply to Farmland Gains?
It depends on whether you were an active farmer or a landlord. The 3.8% net investment income tax applies above $250,000 MAGI (married filing jointly) or $200,000 (single); the thresholds are statutory and not indexed. But under the IRS's NIIT guidance, gain from property held in a trade or business in which you materially participate is excluded from net investment income. Gain from investment property and from passive rental activity is included.
In practice: a farmer who materially participated in the operation and sells the land used in that active business generally escapes the 3.8% on the sale. A retired owner who has cash-rented the ground to a tenant for years, or an heir who never farmed it, generally pays it. On a $3 million gain, that distinction is worth $114,000, and it turns on facts you can sometimes still influence in the years before a sale. The material participation tests are the Section 469 passive activity rules, and retiring farmers should get specific advice before switching from crop-share or self-operation to a cash lease, because the lease structure in the years before sale can change the NIIT answer.
How Do You Determine Your Cost Basis in Farmland?
Basis depends entirely on how you acquired the land: purchased farmland uses cost plus improvements minus depreciation, inherited farmland is stepped up to date-of-death fair market value under Section 1014, and gifted farmland carries over the donor's old basis under Section 1015. No other single input moves the tax bill as much.
Purchased farmland. Start with the purchase price plus closing costs, legal fees, and survey costs. Add every documented capital improvement: drainage tile, grain bins, irrigation, fencing, buildings. Subtract all depreciation claimed (or allowable, even if you failed to claim it) on those improvements. Keep the closing statements and depreciation schedules for as long as you own the land; reconstructing a 1990s basis from fragments is expensive and tends to resolve in the IRS's favor.
Inherited farmland. Heirs take a basis equal to fair market value at the decedent's death. Land your grandfather bought for $200 an acre that appraised at $10,000 an acre at his death carries a $10,000-per-acre basis. Decades of appreciation leave the tax system entirely. The depreciation clock also resets: prior owners' recapture exposure dies with them, and the heir starts fresh depreciation on the date-of-death value allocated to improvements.
Gifted farmland. A lifetime gift carries the donor's basis forward, along with the embedded gain and any recapture attributes. For appreciated land, gifting trades a $19,000-per-recipient annual exclusion benefit (the 2026 annual gift tax exclusion, per Rev. Proc. 2025-32) against the loss of a future step-up. Section 1015 also imposes a dual-basis rule for property gifted at a loss: the donee uses fair market value at the date of gift for computing loss, and the donor's basis for computing gain. Before deeding acreage to children, run the numbers on the tax implications of gifting land against simply holding until death.
If the sale includes the farmhouse you lived in, one more basis-adjacent rule applies: the Section 121 exclusion shelters $250,000 (single) / $500,000 (married filing jointly) of gain on a primary residence owned and used 2 of the last 5 years, applied to the portion of the price allocated to the home and its immediate lot per IRS Publication 523.
How Is Depreciation Recaptured When You Sell a Farm?
Every dollar of depreciation you claimed comes back at sale, and farm property splits into two recapture regimes that are taxed differently: Section 1245 property (drainage tile, grain bins, silos, irrigation equipment, single-purpose livestock structures, machinery) triggers ordinary-income recapture of all depreciation taken, while Section 1250 property (general-purpose barns, machine sheds, and other farm buildings) produces unrecaptured Section 1250 gain taxed at a maximum 25%.
The Section 1245 bucket surprises people most. Per Publication 225, grain storage bins and silos are not treated as buildings; they are Section 1245 property, and so is field drainage tile (Ohio State University Extension has a good plain-language summary). All depreciation claimed on those assets, including Section 179 expensing and bonus depreciation, is recaptured as ordinary income up to the amount of gain, at rates as high as 37%. A seller who expensed $300,000 of tile and bins over the years can owe $111,000 of ordinary-rate tax on that layer alone.
The Section 1250 bucket covers buildings depreciated straight-line under MACRS. For these, the recapture is gentler: the depreciation claimed is taxed at up to 25% rather than ordinary rates, and the balance of the building gain gets capital gain treatment.
Mechanically, the sale price must be allocated among land, Section 1245 assets, and Section 1250 buildings. The dispositions are reported on Form 4797, with capital gain amounts flowing to Schedule D. Pull complete depreciation schedules before you list the property, because the allocation you and the buyer agree to in the contract drives both parties' tax outcomes and is hard to revise later.
Machinery and equipment sold with the farm are a separate taxable event at ordinary recapture rates, and as covered below, they no longer qualify for like-kind exchange treatment.
Worked Example: What Does a $4 Million Farmland Sale Actually Cost in Tax?
Side by side, the same $4 million sale produces roughly $759,780 of federal tax on long-held purchased land and roughly $211,440 on recently inherited land, a $548,340 difference driven entirely by basis. Assumptions for both sellers: married filing jointly, other income already in the 37% bracket, land cash-rented in recent years so the NIIT applies, gross price $4,000,000, selling costs $160,000, amount realized $3,840,000.
Seller A purchased the farm in 1995 for $700,000, later installed $150,000 of drainage tile (fully depreciated, Section 1245) and a $200,000 machine shed (straight-line depreciation of $120,000 claimed, Section 1250).
Seller B inherited the same farm in 2020 at a $3,000,000 date-of-death value and claimed $40,000 of depreciation on the shed since.
| Line | Seller A (purchased 1995) | Seller B (inherited 2020) |
|---|---|---|
| Amount realized ($4,000,000 less $160,000 costs) | $3,840,000 | $3,840,000 |
| Cost basis before depreciation | $1,050,000 ($700K + $150K tile + $200K shed) | $3,000,000 (stepped up) |
| Depreciation claimed | $270,000 ($150K tile + $120K shed) | $40,000 (shed) |
| Adjusted basis | $780,000 | $2,960,000 |
| Total gain | $3,060,000 | $880,000 |
| Section 1245 recapture (ordinary, 37%) | $150,000 x 37% = $55,500 | $0 |
| Unrecaptured Section 1250 gain (25%) | $120,000 x 25% = $30,000 | $40,000 x 25% = $10,000 |
| Long-term capital gain (20%) | $2,790,000 x 20% = $558,000 | $840,000 x 20% = $168,000 |
| NIIT (3.8% of total gain) | $116,280 | $33,440 |
| Total federal tax | $759,780 | $211,440 |
Seller A's effective federal rate on the gain is about 24.8%; nearly 19% of the entire gross sale price goes to federal tax. Seller B pays about 24% of a far smaller gain, or 5.3% of the gross price. Add state tax on top: in Minnesota this sale adds six figures for either seller; in Texas or South Dakota it adds nothing. Every strategy in the rest of this article is a lever on one of these lines.
Can a 1031 Exchange Defer Farmland Capital Gains?
Yes. Under Section 1031, farmland held for business or investment can be exchanged for other real property held for business or investment with the entire gain, including the recapture layers on real-property improvements, deferred into the replacement property. There is no dollar cap on the deferral.
The definition of like-kind is broad within real estate: farmland can be exchanged for an apartment building, a warehouse, a different farm, or a net-leased commercial property. The deadlines are rigid. You have 45 days from closing to identify replacement property in writing and 180 days to close, and a qualified intermediary must hold the proceeds throughout; touching the funds yourself kills the exchange.
One rule changed materially with the 2017 Tax Cuts and Jobs Act: Section 1031 now applies only to real property. Machinery, equipment, and breeding livestock no longer qualify. If you sell a working farm as a package, the personal property portion is taxed in the year of sale at ordinary recapture rates no matter how the real estate side is structured. Whether drainage tile rides along as real property for exchange purposes depends on state law classification, so have the exchange documents address it explicitly.
The deferred gain carries into the replacement property's basis, and if you hold the replacement until death, Section 1014 steps it up and the deferred gain is never taxed. That swap-until-you-drop sequence is the backbone of a great deal of farm wealth. The same framework applies to any capital gains on non-primary-residence real estate, so sellers who want to exit agriculture but stay in real estate can trade into more passive holdings.
How Does an Installment Sale Spread Out the Tax?
An installment sale under Section 453 lets you report gain proportionally as payments arrive rather than all at once, which can hold annual income under the $613,700 threshold where the 20% rate begins for joint filers and, for smaller sales, under the NIIT thresholds. Selling to the neighbor or a tenant on a 10-year contract for deed is the classic structure.
Two technical rules matter at this scale. First, the recapture trap: under Section 453(i), all Section 1245 recapture (and any Section 1250 recapture in excess of straight line) is taxed in the year of sale regardless of how little cash you received. A seller who takes 10% down on a farm loaded with expensed tile and bins can owe more first-year tax than first-year cash. Model the year-one bill before signing.
Second, a genuine break for farmers: the Section 453A interest charge, which normally applies when more than $5,000,000 of installment obligations from sales over $150,000 arise in a year, explicitly does not apply to obligations from the disposition of "property used or produced in the trade or business of farming" per Section 453A(b)(3). Large farm installment notes escape an interest charge that hits comparable commercial real estate sellers.
The remaining risks are commercial. You are the lender: secure the note with a mortgage or deed of trust, underwrite the buyer, and price the interest at or above the applicable federal rate (the interest is ordinary income). If the buyer defaults, foreclosure returns the land with tax consequences of its own.
Do Opportunity Zones Still Work for a 2026 Farmland Sale?
Yes, but the timing rules changed completely in 2025, and for gains realized in 2026 the investment date determines everything. The One Big Beautiful Bill Act made the Opportunity Zone program permanent, and under the IRS's transitional guidance in Notice 2026-40, gain invested in a Qualified Opportunity Fund on or before December 31, 2026 falls under the old regime, meaning the deferred gain comes right back into income on December 31, 2026. Gain invested on or after January 1, 2027 gets the new regime: deferral for five years from the investment date, a 10% basis step-up after five years (30% for qualified rural opportunity funds), and tax-free appreciation on the fund investment itself after a 10-year hold.
The planning consequence for a farmland seller closing in late 2026 is concrete. The reinvestment window is 180 days from the gain. A seller who closes in the second half of 2026 and waits to fund the QOF until January 2027, still inside the 180-day window, converts a worthless few weeks of deferral into a five-year deferral plus the basis step-up. Notice 2026-40 confirms that eligible gains realized on, before, or after December 31, 2026 can be deferred by a timely investment made on or after January 1, 2027.
Unlike a 1031, an Opportunity Zone investment does not require staying in real estate and only the gain, not the full proceeds, needs to be reinvested. The rural fund category is worth attention for agricultural sellers, since many designated tracts are rural and the 30% step-up is triple the standard benefit. The tradeoffs are a 10-year illiquidity horizon and fund quality that varies widely. The tax wrapper cannot rescue a bad underlying investment.
Can a Conservation Easement Reduce the Tax Before You Sell?
A conservation easement under Section 170(h) donates the development rights to a qualified land trust and generates a charitable deduction equal to the appraised value given up, while also shrinking the future taxable gain because the restricted land is worth less at sale. Farmland with development pressure at the urban fringe is where the math works best.
The deduction limits favor working farmers. Individuals can generally deduct qualified conservation contributions up to 50% of adjusted gross income with a 15-year carryforward; qualified farmers and ranchers (more than 50% of gross income from farming) can deduct up to 100% of AGI under Section 170(b)(1)(E).
The abuse era has consequences you need to plan around. The SECURE 2.0 Act added Section 170(h)(7), which disallows the deduction for easements contributed by partnerships and S corporations when the claimed deduction exceeds 2.5 times the sum of the partners' relevant basis, with carve-outs for family partnerships, property held more than three years, and certified historic structures. Treasury finalized regulations in October 2024 designating abusive syndicated easements as listed transactions. A direct donation of long-held family farmland with a defensible appraisal and a genuine conservation purpose remains fully available; a marketed multiple-of-investment deduction is an audit magnet with penalty exposure. The appraisal is the whole ballgame, so hire accordingly.
How Are CRP Payments Taxed, and Do They Affect a Sale?
Conservation Reserve Program payments are taxable income in all cases; the live question is self-employment tax, and the answer splits three ways. Active farmers pay SE tax on CRP rents under the IRS's long-held position (reported on Schedule F per Publication 225). Recipients of Social Security retirement or disability benefits are statutorily exempt: the 2008 Farm Bill amended Section 1402(a)(1) to exclude CRP payments from self-employment income for those individuals. Non-farmer investors sit in contested territory: the Eighth Circuit's 2014 Morehouse decision held CRP payments to a non-farmer are rentals from real estate exempt from SE tax, but the IRS announced nonacquiescence and follows the ruling only within the Eighth Circuit on pre-2008 facts, per the Center for Agricultural Law and Taxation.
For a seller, CRP enrollment cuts two ways. The 15.3% SE tax drag on annual rents (for those not exempt) is a reason retirement-age landowners often elect out of farming status before a sale anyway, which then interacts with the NIIT material participation analysis above. And enrolled land transfers with contract obligations attached: a buyer who does not assume the CRP contract can trigger repayment of prior payments, so the contract status belongs in the purchase agreement and in your net-proceeds math.
Which States Take the Biggest Bite of a Farmland Gain?
State tax on a farmland sale runs from zero to 13.3% depending on where the land sits, and the state where the property is located gets to tax the gain regardless of where you live. The Corn Belt states are moderate and getting cheaper; the coastal states are where combined rates approach 35%.
| State | 2026 treatment of farmland gains | Top rate |
|---|---|---|
| Iowa | Flat 3.8%; qualifying retired farmers can exclude farmland gain entirely | 3.8% or 0% |
| Illinois | Flat 4.95% on all income | 4.95% |
| Nebraska | Graduated, top 4.55% (falling to 3.99% in 2027) | 4.55% |
| Minnesota | Ordinary rates to 9.85% plus 1% surtax on net investment income over $1M | 10.85% |
| California | Taxed as ordinary income | 13.3% |
| New York | Taxed as ordinary income | 10.9% |
| Texas, Florida, South Dakota, Wyoming | No state income tax | 0% |
Iowa deserves the headline. Since 2023, a retired farmer who is 55 or older (or disabled), held the land 10 or more years, and materially participated in farming for 10 or more years can make a single lifetime election to exclude the entire capital gain on farmland from Iowa tax, per the Iowa Department of Revenue and Iowa State's Center for Agricultural Law and Taxation. The election is one-time and the retired farmer must choose between this exclusion and a parallel exclusion for farm lease income, so a multi-parcel owner should spend the election on the largest sale. Everyone else in Iowa pays the flat 3.8% that took effect in 2025.
Minnesota is the trap in the farm belt: its 1% net investment income tax on net investment income over $1 million stacks on a 9.85% top rate, so a large sale by a non-materially-participating owner faces up to 10.85% state plus 23.8% federal. Nebraska's top rate falls to 4.55% for 2026 and 3.99% for 2027 under LB 754, which makes a one-year delay worth half a point. Illinois holds at a flat 4.95%. California taxes gains as ordinary income at up to 13.3%.
Nonresident sellers face withholding at closing in many states and must file a nonresident return where the land sits, with a credit claimed in the home state. The mechanics, including which state's rate effectively wins, are covered in our guide to capital gains tax on property sold out of state. Moving your own domicile to a no-tax state before a sale works only for the resident-state layer, never for the property-state layer, and states audit domicile changes made on the eve of large sales.
How Is Inherited Farmland Taxed at the Estate Level?
Inherited farmland gets the Section 1014 basis step-up on the income tax side, and on the estate tax side most family farms now fit comfortably under the exemption: the federal estate and gift tax exemption is $15,000,000 per person ($30,000,000 per married couple) from January 1, 2026, made permanent by the One Big Beautiful Bill Act and indexed for inflation from 2027. Estates above that pay 40% on the excess.
Scale matters more than it used to. USDA's Land Values 2025 Summary puts average U.S. farm real estate at $4,350 per acre and cropland at $5,830 per acre, so a 2,000-acre Iowa or Illinois operation can clear $20 million in land alone before equipment, bins, and financial assets. For estates that do cross the line, Section 2032A special use valuation lets the executor value qualifying farmland at its agricultural use value rather than development value, reducing the gross estate by up to $1,460,000 for deaths in 2026 per Rev. Proc. 2025-32. The discount comes with strings: qualified heirs must keep the land in qualified farm use for 10 years, and a sale outside the family or cessation of farming within that window claws the estate tax benefit back. An heir planning to sell soon after inheriting should generally not elect 2032A; note that the election also caps the Section 1014 step-up at the special use value, which converts an estate tax saving into a capital gains cost at sale.
Held to death, the step-up plus the $15 million exemption means most farm families pay neither estate tax nor capital gains tax on generations of appreciation. That is the benchmark every lifetime sale strategy has to beat, and it is why coordinated estate planning belongs in the conversation before any listing agreement is signed. For land held by siblings or partners as tenants in common, the step-up applies only to the decedent's fractional interest, so co-owners selling the same parcel can face wildly different tax bills.
Should You Sell Now, Structure the Sale, or Hold Until Death?
For an owner who does not need liquidity, holding until death remains the mathematically dominant outcome: the step-up erases the income tax and the $15 million per-person exemption shelters the estate tax for all but the largest operations. Every lifetime strategy is a tradeoff against that baseline, priced by how much you need the cash now.
| Strategy | Tax outcome | Best for | Key constraint |
|---|---|---|---|
| Outright sale | Full gain plus recapture taxed in year of sale | Sellers needing immediate liquidity | Highest immediate tax |
| 1031 exchange | Full deferral into replacement real property | Sellers staying in real estate | 45/180-day deadlines; real property only |
| Installment sale | Gain spread over the note term | Bracket and NIIT management | Recapture taxed in year one; buyer credit risk |
| Opportunity Zone fund (2027+ investment) | 5-year deferral, 10%/30% step-up, tax-free growth after 10 years | Sellers exiting real estate entirely | 10-year illiquidity; fund quality varies |
| Conservation easement | Deduction up to 50%/100% of AGI plus smaller gain | Land with development value and conservation intent | Appraisal scrutiny; 2.5x rule for entities |
| Hold until death | Step-up erases gain; estate tax only above $15M/$30M | Owners with no liquidity need | Heirs inherit the decision, and the land |
These combine. A partial easement followed by an installment sale of the remaining acreage cuts the gain and spreads what is left. A 1031 into passive net-leased property followed by a hold until death defers and then erases the gain. The right stack depends on liquidity needs, heirs, and domicile, which is why farmland exits reward the same deliberate sequencing as any other concentrated position; the broader playbook lives in our tax strategy hub, and the general toolkit for minimizing capital gains taxes applies here with the agricultural layers added. If the land carries operating-loan debt, review how refinancing interacts with capital gains before locking a structure, since debt relief counts in the amount realized.
Whatever the structure, start the workpapers early: depreciation schedules, improvement receipts, the purchase-price allocation, and the entity ownership chart. On a $4 million sale, the spread between a planned exit and an unplanned one is routinely six figures, and every dollar of it is decided before the closing date.
Sources
- Internal Revenue Service, Rev. Proc. 2025-32 (2026 inflation adjustments: capital gains brackets, gift exclusion, Section 2032A limit)
- Internal Revenue Service, Publication 544: Sales and Other Dispositions of Assets
- Internal Revenue Service, Publication 225: Farmer's Tax Guide
- Internal Revenue Service, Publication 537: Installment Sales
- Internal Revenue Service, Questions and Answers on the Net Investment Income Tax
- Internal Revenue Service, Like-Kind Exchanges: Real Estate Tax Tips
- Internal Revenue Service, Notice 2026-40: Transitional Guidance on Qualified Opportunity Zones
- Internal Revenue Service, Form 4797: Sales of Business Property
- 26 U.S.C. Section 1014, Section 1015, Section 1402, Section 453A, Section 2032A
- Federal Register, Syndicated Conservation Easement Transactions as Listed Transactions (Oct. 8, 2024)
- USDA National Agricultural Statistics Service, Land Values 2025 Summary
- Iowa Department of Revenue, Individual Income Tax Provisions and 2025 flat rate announcement
- Iowa State University Center for Agricultural Law and Taxation, Understanding Iowa's New Tax Rules for Retired Farmers and Reporting CRP Income
- Nebraska Department of Revenue, Individual Income Tax Rate Chronology
- Minnesota Department of Revenue, Net Investment Income Tax
- Illinois Department of Revenue, Income Tax Rates
- California Franchise Tax Board, Capital Gains and Losses
- Morehouse v. Commissioner, 769 F.3d 616 (8th Cir. 2014), summarized with the IRS nonacquiescence at Current Federal Tax Developments
- Ohio State University Extension, Depreciation of Farm Drainage Tile
