Capital gains tax on farmland: what each piece of the farm costs you in 2026
A farm sale is several sales at once
The buyer writes one check, but the IRS taxes a farm asset by asset, and the purchase agreement should allocate the price the same way on both sides. The usual pieces:
- Land and land you rented out: Section 1231 property once held more than one year (IRC 1231(b)(1)). Net 1231 gain for the year is taxed at the long-term rates, 20% above $613,700 of taxable income for joint filers (Rev. Proc. 2025-32, 2026).
- Machinery, grain bins, single-purpose livestock and hog buildings: Section 1245 property (IRC 1245(a)(3)). Gain up to the depreciation you took is ordinary income, which after years of Section 179 and bonus depreciation is often most of the sale price.
- The house and general-purpose barns: Section 1250 buildings. Depreciation on a barn is unrecaptured 1250 gain taxed at up to 25% (IRC 1(h)(6), 2026); the farmhouse you live in may qualify for the Section 121 exclusion.
- Growing crops sold with the land: an unharvested crop sold at the same time and to the same buyer as land held over a year is treated as 1231 property (IRC 1231(b)(4)), but the costs of raising that crop are not deductible (IRC 268).
- Grain and feed on hand: inventory, ordinary income.
The allocation between land and bins matters most: every dollar shifted from land to equipment turns a 1231 dollar into an ordinary one. Our purchase price allocation page shows how buyers and sellers pull in opposite directions.
Raised livestock: zero basis, but 1231 gain
A cash-method farmer deducts the feed, vet bills and labor that go into raising a heifer, so a raised cow has no tax basis. That sounds bad, but it is a favorable result: because the animal was never depreciated, there is no 1245 recapture, and the full price of a qualifying breeding or dairy animal is 1231 gain.
The holding period is the trap. Cattle and horses count only if held for draft, breeding, dairy or sporting purposes for 24 months or more from acquisition; other livestock need 12 months; poultry never qualifies (IRC 1231(b)(3)). A dairy dispersal that sells first-calf heifers at 22 months old reports those animals as ordinary income. Purchased breeding stock that you depreciated is different again: gain up to the depreciation taken is 1245 recapture. A herd sale schedule should sort animals into these three groups before the auction.
Sections 1252 and 1255: recapture most sellers forget
If you deducted soil and water conservation costs under IRC 175, such as terraces, grassed waterways or ponds, Section 1252 claws them back as ordinary income when you sell the land within 10 years of acquiring it. The applicable percentage is 100% within 5 years, then 80%, 60%, 40% and 20% in years six through nine, and 0% at 10 years or more (IRC 1252(a)(3)). The recapture is the smaller of that percentage of the deductions or the gain.
Section 1255 does the same for government cost-share payments you excluded from income under IRC 126: 100% of the excluded amount is ordinary income if you sell within 10 years of receiving the payment, dropping 10 percentage points for each year after that (IRC 1255(a)(2)). Long-held family land usually escapes both, but a farm bought in the last decade and improved with conservation money can carry a surprise. Both show up on Form 4797, Part III (IRS Publication 225, 2025 edition).
Cash rent vs farming it: the 3.8% question
The 3.8% net investment income tax under IRC 1411 (2026 threshold $250,000 of modified AGI for joint filers, not indexed) reaches gain on property held in a passive activity. Cash renting is a rental activity and passive for most landlords, so in our first example the land sale adds $61,560 of investment income tax. When the sellers farm the ground themselves and materially participate, the land is property used in a non-passive trade, and the same sale owes no NIIT, leaving the total at $425,300.
Retired farmers get a special rule: IRC 469(h)(3) treats a retiree or surviving spouse who met the 2032A material participation test as still materially participating in a farming activity. Whether that reaches land you now crop-share depends on whether the lease is a farming activity or a rental, which turns on your risk and involvement. A straight cash lease is a rental. If you are within a few years of selling, the lease form is worth reviewing with your CPA; see investment income tax on a sale.
State farm breaks: Wisconsin and Iowa
Illinois, our example state, taxes farm gain at its flat 4.95% (35 ILCS 5/201, 2026) with no farmland break. Two big farm states treat farm sellers better:
- Wisconsin excludes 60% of capital gain on farm assets held more than one year, defined as livestock, farm equipment, farm real property and farm depreciable property, versus 30% for other assets (Wis. Stat. 71.05(6)(b)9, 2026). Depreciation recapture gets no exclusion.
- Iowa subtracts the entire net capital gain on real property used in a farming business if the seller materially participated in farming for 10 years and held the land 10 years, with a separate path for sales to relatives (Iowa Code 422.7(13)(b), 2026). Retired farmers can also subtract gain on breeding cattle and horses held 24 months. Iowa's material participation test excludes the federal retired-farmer rule, and cash-rent landlords who never farmed generally do not qualify. Iowa's flat rate is 3.8% for 2025 and later (Iowa Code 422.5).
Rules for other states are on each state capital gains page, for example Wisconsin and Iowa.
Spreading the farm sale
Selling everything in one year stacks recapture on top of land gain. In our third example the operator adds $104,345 of tax for $260,000 of machinery and bin recapture, because that income is ordinary and pushes the land gain higher. Farm sellers have two federal tools other sellers lack. Farm property is exempt from the Section 453A interest charge and pledge rule however large the note (IRC 453A(b)(3)(B)), so a land contract to a neighbor or child works at any size; see farm installment sale and the 453A interest charge. And for sales to a qualified farmer, IRC 1062 lets you pay the federal tax on qualifying farmland gain in four annual installments. Recapture is always taxed in the year of sale, even on an installment note (IRC 453(i)).
Some owners do the opposite and hold. Land kept until death gets a stepped-up basis, and special use valuation can lower its estate value; see the step-up hold analysis and Section 2032A. Get the Big Sale Tax Analysis at /analysis/ to compare a cash sale, a land contract and holding.
What to know
The 1231 label only helps if your net 1231 result is a gain and you had no unrecaptured 1231 losses in the prior five years; see Section 1231 gain. Pushing price toward land saves you tax but costs the buyer depreciation, so expect negotiation. Changing a lease to show material participation must be real, not paperwork. State farm breaks have their own participation tests that differ from the federal ones.
Worked example
Couple bought the ground in 1998 and has cash rented it to a neighbor for years; $1,800,000 gain on the land, $70,000 of other income, no prior 1231 losses. Same facts, but the couple materially participates in farming the ground, so the land gain is from property used in a non-passive trade or business. Same operator also sells depreciated equipment and grain bins for $260,000 over their adjusted basis (all Section 1245 recapture) along with the land.
| Engine run | Cash-rent landlord sells 300 acres, Illinois | Same land, sold by the couple who farm it | Operator sells land plus the line of machinery and bins |
|---|---|---|---|
| Filing status | Married, joint | Married, joint | Married, joint |
| State | Illinois | Illinois | Illinois |
| Other income (wages, pension, interest) | $70,000 | $70,000 | $70,000 |
| Long-term capital gain | $1,800,000 | $1,800,000 | $1,800,000 |
| Section 1245 recapture (ordinary income) | $0 | $0 | $260,000 |
| Federal income tax on the sale | $336,200 | $336,200 | $427,675 |
| Net investment income tax (3.8%) | $61,560 | $0 | $0 |
| State income tax on the sale | $89,100 | $89,100 | $101,970 |
| Total tax caused by the sale | $486,860 | $425,300 | $529,645 |
| Effective rate on the gain | 27.0% | 23.6% | 25.7% |
| Gain kept after these taxes | $1,313,140 | $1,374,700 | $1,530,355 |
Computed October 7, 2026 by the Big Sale Tax engine (engine.js yearTax): federal brackets, 0/15/20% thresholds and AMT from Rev. Proc. 2025-32 (OBBBA-adjusted) and the One Big Beautiful Bill Act (P.L. 119-21); NIIT under IRC 1411 (thresholds not indexed); state tax from the engine's state table. "Tax caused by the sale" = tax with the sale minus tax without it. Excludes selling costs, local taxes and estimated-tax timing. Education only.
Run your own numbers
2026 law from the engine: federal 0/15/20% brackets (Rev. Proc. 2025-32), 25% cap on unrecaptured 1250 gain, ordinary rates on 1245 recapture, 3.8% NIIT over $200,000 single / $250,000 joint (IRC 1411), AMT, and your state's rules. Tax shown is the tax caused by the sale. Excludes selling costs, local taxes and NIIT exceptions for active business owners. Education only.
Long-Term vs Short-Term Capital Gains (2026)
The one-year holding rule, the 2026 0/15/20% thresholds for every filing status, NIIT, recapture, the state layer and a worked $200,000 example: 11 months vs 13 months, and what spreading the gain can save.
Frequently asked questions
How much is capital gains tax on farmland?
Do farmers pay capital gains tax when selling land?
Is selling cattle capital gains?
Is rental income from farmland subject to net investment income tax?
Can I avoid capital gains on farmland by gifting it to my kids?
What is Section 1252 recapture?
Sources
- IRC 1231, property used in the trade or business (Cornell LII)
- IRC 1252, farm land recapture (Cornell LII)
- IRC 1255, section 126 property (Cornell LII)
- IRC 1245 (Cornell LII)
- IRC 1411, net investment income tax (Cornell LII)
- IRC 469, passive activities (Cornell LII)
- IRS Publication 225, Farmer's Tax Guide
- Wis. Stat. 71.05(6)(b)9
- Iowa Code 422.7 (2026)
- Rev. Proc. 2025-32 (IRS)
Figures as of October 7, 2026; each rate and limit above names its source and year. Education only, not legal or tax advice.
Keep reading
Section 1231 gain
Why business real estate, equipment and goodwill end up at long-term rates, how netting and the five-year lookback work, and where recapture cuts in first.
ReadFarm installment sale
Selling farmland on a land contract: the gain spreads, there is no Section 453A interest charge at any size, and Section 1062 is new for 2026.
ReadSpecial use valuation (2032A)
Section 2032A lets a family farm or business building be valued at its current use instead of its best price for estate tax, if the heirs keep it in use for ten
ReadLand sale
Raw land has no depreciation to recapture, so the big question is whether the IRS sees you as an investor or a dealer.
ReadConservation easement
Sell it, donate it or split the difference: each path taxes your farm's development rights differently.
ReadTimber sale
Standing timber held over a year is capital gain, but only the depletion basis you can prove comes off the top.
ReadKnow your number before you sign.
The Big Sale Tax Analysis is a flat $5,000. Start with a free scoping call; you are invoiced only after it, and only if you go ahead.
Prefer email? Request the analysis by email.