Capital gains tax on farmland: what each piece of the farm costs you in 2027
Request the analysis Book a free scope call
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 $633,600 of taxable income for joint filers (Rev. Proc. 2026-35, 2027).
- 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), 2027); 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 (2027 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 $423,761.
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,815 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 regular federal income tax on qualifying farmland gain in four equal annual installments; the next section works an example.
Section 1245 recapture on machinery and bins 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.
Paying the tax over four years: the Section 1062 election
The 2025 tax law (P.L. 119-21, section 70437) added IRC 1062 for sales in tax years beginning after July 4, 2025, so it is available to calendar-year sellers from 2027. It does not shrink the tax.
It lets you pay the part of your regular federal income tax caused by the farmland gain in four equal installments: the first with the return for the year of sale (the original due date, no extension), then one on each of the next three return due dates (IRC 1062(a), (b)(1)). The statute sets no interest charge on installments paid on time.
Three tests have to be met (IRC 1062(d)):
- The land. United States real property that you used as a farm, or leased to a qualified farmer for farming, for substantially all of the 10 years before the sale.
- The buyer. A qualified farmer: an individual actively engaged in farming.
- The covenant. The land must carry a covenant or other enforceable restriction that keeps it in farm use for 10 years after the sale, and a copy goes in with your return (IRC 1062(e)).
Worked example. Take the cash-rent couple above: 300 Illinois acres leased to a farming neighbor for more than 10 years, sold to that neighbor with the 10-year covenant recorded. Their regular federal income tax caused by the sale is $320,365 (2027 brackets, Rev. Proc. 2026-35).
With the election they pay $80,091 with the 2027 return and $80,091 with each of the 2027, 2028 and 2029 returns. Still due in full with the 2027 return: $164,956 of alternative minimum tax, net investment income tax and Illinois tax, because the election covers only the regular income tax less credits (IRC 1062(d)(1)).
Treasury and the IRS issued proposed regulations on the election on September 28, 2026 (IRS news release IR-2026-115). They cover sales by partnerships, S corporations, trusts and estates, and how land temporarily out of production (a government program, a recognized farming practice, events outside your control) still meets the 10-year use test. Comments are due November 30, 2026, so the details can still change before they are final.
Read the fine print before you count on it. Miss an installment and the whole balance comes due at once; the same happens for the year of the seller's death (IRC 1062(b)(2)).
The election is made on the return for the year of sale, and partners and S corporation shareholders make it one by one (IRC 1062(c)).
It can be combined with ordinary planning, but it is a payment plan for a cash sale, not an installment sale: a land contract under Section 453 spreads the gain itself, which can also lower the rate. See farm installment sale for that path.
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.
How much tax does this sale cause? A worked example
Couple bought 300 acres in 1998 for $600,000 and has cash rented it to a neighbor for years. They sell for $2,490,000 and pay $90,000 of selling costs: $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 | $334,661 | $334,661 | $426,606 |
| 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 | $485,321 | $423,761 | $528,576 |
| Effective rate on the gain | 27.0% | 23.5% | 25.7% |
| Gain kept after these taxes | $1,314,679 | $1,376,239 | $1,531,424 |
Step by step: Cash-rent landlord sells 300 acres, Illinois
The same example worked by hand from the 2027 federal tables (California: FTB 2026 schedule), so you can follow each line with a calculator. Rounded to the dollar.
- The gain. $1,800,000 long-term capital gain = $1,800,000. Other income that year: $70,000, married filing jointly.
- Without the sale. Taxable income is $70,000 less the $33,200 standard deduction = $36,800; regular federal tax on that is $3,904 (2027 brackets, Rev. Proc. 2026-35).
- With the sale. Taxable income becomes $1,836,800. The ordinary part ($36,800: other income, less the deduction) is taxed at ordinary rates: $3,904. The long-term gain: $65,300 at 0%, $531,500 at 15%, $1,203,200 at 20% = $320,365 (0% to $102,100 and 15% to $633,600 of taxable income, 2027). Regular tax with the sale: $324,269.
- Federal income tax caused by the sale. $324,269 less $3,904 = $320,365, plus $14,296 of alternative minimum tax the sale triggers (2027 exemption $144,700, phased out above $1,031,900) = $334,661.
- Net investment income tax. 3.8% of the smaller of net investment income or income over $250,000 (IRC 1411, not indexed): net investment income from the sale is $1,800,000; income over the threshold is $1,620,000. 3.8% x $1,620,000 = $61,560.
- State. $1,800,000 of capital gain at 4.95% = $89,100. State tax caused by the sale: $89,100.
- Total. $334,661 + $61,560 + $89,100 = $485,321, which is 27.0% of the gain.
Computed November 21, 2026 by the Big Sale Tax engine (engine.js yearTax): federal brackets, 0/15/20% thresholds and AMT from Rev. Proc. 2026-35 (IR-2026-133, Nov 5 2026) 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.
How much tax would you owe? Run your own numbers
2027 federal law from the engine: 0/15/20% brackets (Rev. Proc. 2026-35), 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 (California on the FTB 2026 schedules, because the 2027 schedule is not published yet).
What was sold and years held only matter in a few states: Washington exempts real estate, Ohio and New Mexico treat a business sale differently, Arizona subtracts 25% for assets bought after 2011 and Oklahoma deducts gain on Oklahoma property held 5 years or more.
Tax shown is the tax caused by the sale. Selling costs are subtracted in the price block above. Excludes local taxes other than Maryland's county tax (3.2% used).
Tick the active-owner box if you materially participate in the business. Education only.
Get this breakdown by email, plus the one-page Seller Tax Worksheet
We email you the numbers from this page (the gain and the federal, 3.8% and state pieces) with a one-page worksheet to fill in with your CPA: your gain line by line, the tax buckets, the 2027 thresholds and five questions to ask before you sign.
Also free: the book Same Sale, Different Tax, the same $1,000,000 gain taxed ten ways. Want it run on your sale? Book a free scope call to see whether the Big Sale Tax Analysis is worth it.

Who you will talk to
Hans Goldstein · Sacramento, California
Hans Goldstein: Tax & Exit Planning, an independent practice. Enrolled Agent, admitted to practice before the Internal Revenue Service. CA Insurance License #4273294, NPN 20602398.
- What happens first
- You fill in the short form for a free scope call, about 5 minutes. Hans reviews every one personally and replies within 1 business day. If it is a fit, you get a link to book the call.
- The scope call
- Fifteen minutes, free: price, timeline, what you are selling and what the money is for. Scope means you hear whether the analysis is worth it for your sale.
- What you get
- A written side-by-side comparison of your cash-sale baseline against every path that fits, year-by-year numbers, a written recommendation, and a review meeting with you and, if you like, your CPA and attorney.
- What it costs
- The scope call is free. The Big Sale Tax Analysis is $5,000 per household per transaction, only if you decide it is worth it. No retainer, no hourly billing, no obligation to use any strategy.
- How Hans is paid
- The $5,000 fee pays for analysis only and is not reduced or credited if you buy anything. You are never required to buy anything. No referral fees are paid to or received from brokers, CPAs or attorneys. Hans is also a licensed insurance producer with a separately owned insurance business. That business is not part of this engagement, and the analysis does not recommend insurance products. If you later choose an installment sale funded through an insurance company, that company pays Hans a commission through his separate insurance business. He may be compensated by that business if you use an insurance-funded installment sale. Hans is an Enrolled Agent (EA), admitted to practice before the Internal Revenue Service. He is not a CPA, attorney or registered investment adviser; the analysis models tax effects and does not recommend specific securities. Read the disclosures.
Book a free scope call or call 213-340-2018. Hans answers or calls back the same business day.
Related calculators, tables and guides
- Installment sale tax (Section 453): How the gain spreads over the years you are paid, with a calculator
- 1031 exchange vs installment sale: Keep owning real estate, or get out on a schedule: same sale three ways
- Capital gains tax by state: Tax on a $1,000,000 gain in all 50 states and DC, with sources and a CSV
- Capital gains tax calculator: Start from price, costs and basis; federal, NIIT and state for a 2027 sale
- Capital gains tax statistics 2027: 62 dated figures with their IRS and Treasury sources, plus a CSV
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?
Can I pay the tax on a farmland sale in installments?
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. 2026-35 (IRS)
- IRC 1062, election to pay tax on qualified farmland gain in four installments (Cornell LII)
- IRC 453A(b)(3)(B), farm property excepted from the interest charge (Cornell LII)
- IRC 453(i), recapture income in the year of sale (Cornell LII)
- IRS news release IR-2026-115 (September 28, 2026): proposed regulations on installment payments of tax on farmland sales
Figures as of October 10, 2026; each rate and limit above names its source and year. Education only, not legal or tax advice.
Keep reading
Illinois
Illinois taxes gains at a flat 4.95%, but an S corporation or partnership selling assets also pays a 1.5% replacement tax, and retirees get no break on gains.
ReadSection 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.
Read