Kingdom Exploration (307) 622-1645

1031 exchange and oil and gas: the rules, the taxes and the ways out.

How a like-kind exchange works, what the IRS collects when one fails or leaves cash on the table, and where oil and gas fits for a property owner who is ready to exit.

The 1031 clock, and where it can end

  1. Day 0: the sale closesA qualified intermediary holds the cash. You never touch it.
  2. Day 45: name the replacementIn writing, signed, delivered. No extensions.
  3. Day 180: close on itOr your tax return due date, if that comes first.
  4. Done right: tax postponedYour old basis and your old gain move into the new property.
  5. Boot or a missed deadline: tax dueUp to 25% on past depreciation, 20% on the rest, plus 3.8%.
  6. Drilling deductionsOne way to answer that bill with fresh money. This page shows the math and the limits.

A 1031 exchange lets you sell investment real estate and put off the tax, as long as the money goes into other real estate under strict deadlines.1,2 It postpones the tax. It does not erase it. And sooner or later most owners want out: out of tenants, out of debt, out of the next property.

This page covers both halves. First the exchange itself: the rules, the deadlines and what the bill looks like when an exchange fails or leaves cash over. Then the part few 1031 guides cover: how oil and gas fits, both as replacement property and as a source of deductions against the tax you could not defer.

We organize oil and gas drilling programs, so we have a stake in the second half. That is why every rule below links to the statute or the IRS page it comes from, and why the limits get as much room as the benefits.

On this page
  1. What is a 1031 exchange?
  2. The 1031 exchange rules and deadlines
  3. What you owe if you sell without an exchange
  4. What is boot?
  5. What happens when a 1031 exchange fails?
  6. Can you do a 1031 exchange into oil and gas?
  7. How oil and gas drilling deductions work
  8. Six situations, and whether oil and gas helps
  9. Calculator: your tax bill and what a deduction is worth
  10. The catches
  11. Other ways out of a 1031 chain
  12. The program we have open now

What is a 1031 exchange?

A 1031 exchange, also called a like-kind exchange, is a sale of business or investment real estate where the proceeds go into other business or investment real estate and the gain is not taxed that year.1 It is named for section 1031 of the Internal Revenue Code.

Since 2018 only real property qualifies. Equipment, vehicles, artwork and other personal property no longer do.2 Your own home does not qualify, and neither does property you hold mainly to resell, such as a flip.2

"Like-kind" is broader than it sounds. An apartment building can be exchanged for raw land, a warehouse for a rental house, a farm for a share of an office building. What matters is that both are real property held for business or investment.2

The tax does not go away. Your basis in the old property carries into the new one, so the untaxed gain and all the depreciation you have claimed travel with you.1 You pay when you finally sell for cash. The one true exit is to hold until death: your heirs take the property at its value on that date, and the deferred gain is never taxed.3

The 1031 exchange rules and deadlines

Five rules decide whether an exchange holds. Miss any one of them and the sale is taxed as an ordinary sale.

RuleWhat it requires
Do not touch the moneyIn a delayed exchange the proceeds go to a qualified intermediary, who holds them and buys the replacement for you. If you or your agent can get at the cash, the exchange fails. Your own attorney, accountant, broker or employee from the last two years cannot serve as the intermediary.4
45 days to identifyYou must name the replacement property in a signed writing delivered by midnight of the 45th day after your sale closes. Weekends and holidays count.4
180 days to closeYou must own the replacement by the 180th day, or by the due date of your tax return for the year of the sale, whichever comes first. A sale late in the year usually means filing an extension to keep the full 180 days.4
How many propertiesYou can identify up to three properties of any value, or more than three if their combined value is no more than 200% of what you sold.4
Equal or greater valueTo defer all of the gain, buy property worth at least as much as you sold, reinvest all the cash, and replace any debt that was paid off with new debt or added cash. Anything short of that is taxable boot.1

The same taxpayer who sold must be the one who buys. The exchange is reported on Form 8824 with your return for the year of the sale.5

The 45 days is where most exchanges die. It is about six weeks to find, inspect and commit to a property in whatever market you happen to be standing in.

What you owe if you sell without an exchange

A straight sale of a rental or commercial property held more than a year is taxed in up to four layers.

Layer2026 federal rate
Depreciation you claimedUp to 25%. The gain that comes from past depreciation on real property is called unrecaptured section 1250 gain.6
The rest of the gain0%, 15% or 20% long-term capital gains rates. For 2026 the 20% rate starts above $613,700 of taxable income on a joint return and $545,500 for a single filer.7
Net investment income tax3.8% on investment gains once income passes $250,000 joint or $200,000 single. Those thresholds are not indexed to inflation.8
State income taxZero in states such as Texas, Florida and Wyoming. More than 10% at the top in a few others.

Illustration only

A couple bought a rental building for $600,000, claimed $200,000 of depreciation over the years, and sells it for $1,200,000. Their other income already puts them in the top capital gains bracket. Selling costs and state tax are left out to keep the arithmetic visible.

Gain ($1,200,000 less $400,000 adjusted basis)
$800,000
Depreciation layer: $200,000 at 25%
$50,000
Remaining gain: $600,000 at 20%
$120,000
Net investment income tax: $800,000 at 3.8%
$30,400
Federal tax on the sale
$200,400

That is a quarter of the gain, before any state tax. It is why owners exchange, and it is the bill that is waiting when an exchange only partly works.

What is boot in a 1031 exchange?

Boot is anything you receive in an exchange that is not like-kind real property. It is taxable up to the amount of your gain.1 It shows up three common ways:

A partial exchange is still an exchange. The reinvested part is deferred and only the boot is taxed. Many owners take boot on purpose to pull some cash out. The question then is what to do about the tax on it, and that is one place drilling deductions come in.

What happens when a 1031 exchange fails?

If you miss the 45 day or the 180 day deadline, the exchange fails and the sale is taxed like any other sale: depreciation recapture, capital gains and the 3.8% tax all apply. The intermediary returns your money and the gain goes on your return.

The timing can give you room. When a sale closes late in one year and the intermediary does not release the funds until the next year, the regulations generally let you report the gain in the year you actually receive the cash, under the installment sale rules.4,9 Two conditions matter. You must have genuinely intended to complete an exchange, and gain tied to debt that was paid off at the sale is generally still taxed in the first year.4,9

Why the year matters A deduction only helps in the year the income lands. If your exchange fails in February and the gain falls in that new tax year, you have until December 31 to do something about it. If the gain falls in the year that just closed, most of your options closed with it.

Can you do a 1031 exchange into oil and gas?

Yes, for the right kind of interest. Oil and gas interests that last as long as the minerals do are real property for 1031 purposes, so they can be replacement property for a building or land, and the reverse.10,11

The regulations define real property to include "unsevered natural products of land," and they name mines, wells and other natural deposits. They also count a leasehold as an interest in real property.11 On that footing the IRS has long treated the main oil and gas interests as like-kind to other real estate.10

InterestReplacement property in a 1031?
Mineral rights (fee minerals)Yes. Ownership of the minerals in the ground is real property.10,12
Royalty and overriding royaltyGenerally yes, when the interest runs for the life of the lease or the deposit. A royalty limited to a set term or a set dollar amount does not qualify.10,12
Working interest in a leaseGenerally yes, when held directly and not limited in duration. This is the interest that pays its share of drilling and operating costs.10
Production paymentNo. A right to a fixed amount of production or money is treated as an assignment of income, not real property.10
Partnership units, fund shares, oil company stockNo. Partnership interests and securities are excluded, whatever the partnership owns.1,11
Well equipment on its ownNo. Personal property stopped qualifying in 2018.2

What trips people up

Joint ownership can be a partnership for tax purposes. Several owners sharing a working interest under an operating agreement are often treated as a tax partnership, and a partnership interest cannot be exchanged. The usual fix is an election out of the partnership rules under section 761(a), made on time.10,11 Ask before you sign, not after.

Oil and gas usually carries no mortgage. If your sale paid off a loan, you have to replace that debt with added cash or accept mortgage boot.

Exchange dollars buy no new deduction. This is the point most promoters skip. Your old basis carries over into whatever you exchange into.1 If you exchange a fully depreciated building into a royalty or a working interest, you get the tax deferral and the income, but you do not get a fresh drilling write-off. The big deductions described next come only from new money spent on drilling.

Your intermediary has to be willing. Many qualified intermediaries have never closed a mineral or working interest exchange. Find one who has, and have your tax adviser confirm that the specific interest qualifies.

How oil and gas drilling deductions work

When you pay your share of the cost to drill a well, the tax code lets you deduct most of that cost in the first year. That deduction is separate from section 1031, and it can be used in the same year as an exchange or a sale.

Intangible drilling costs. Labor, fuel, drilling services, mud and everything else with no salvage value typically make up 60% to 80% of the cost of a well. The owner can elect to deduct them in the year they are paid instead of spreading them over the life of the well.13

Equipment. Casing, tanks, pumps and the rest of the hardware are the tangible costs. Under the 2025 tax law, 100% bonus depreciation is permanent for property acquired after January 19, 2025, so equipment can also be written off in the year it goes into service.14

The form of ownership decides who can use it. Losses from most investments you do not run yourself are passive, and passive losses cannot offset wages, business income or the gain on a building. A working interest in an oil or gas well is the exception written into the law, provided you hold it directly or through an entity that does not limit your liability.15 A limited partner unit does not get this treatment.

There is a yearly ceiling. For 2026, net business losses can offset no more than $512,000 of other income on a joint return, or $256,000 for a single filer.7 Losses above that are not lost. They carry forward as a net operating loss to later years.16

Illustration only

The same couple from the earlier example puts $300,000 of new money into a drilling program in the year of their sale. Assume 80% of it is deductible that year. The actual share depends on the program and on when the wells are drilled.

First-year deduction: $300,000 at 80%
$240,000
2026 ceiling on a joint return
$512,000
Used against $240,000 of salary or business income taxed at 37%
$88,800 less tax
Or, with no other income, used against the gain at 20% to 25%
$48,000 to $60,000 less tax

The deduction is worth the most against ordinary income and less against a capital gain. Either way it is only one side of the ledger. The $300,000 is at risk in the wells, and a tax saving does not rescue a poor well.

Six situations, and whether oil and gas helps

1. Full exchange, no cash out Not for the gain

All the gain is deferred, so there is nothing from the sale to offset. Drilling deductions can still work against your salary or business income, which is where each dollar deducted is worth the most.

2. Partial exchange with boot Often the cleanest fit

Size the drilling investment to the taxable boot. Boot is usually small enough to stay under the yearly loss ceiling, so the deduction can be used in full in the same year.

3. Failed exchange A fallback with a deadline

Drilling costs paid in the same tax year as the gain are the fallback. If the exchange straddled the new year and the gain lands in the later year, you have the rest of that year to act.

4. Final sale, no exchange Helps, with limits

Deductions reduce ordinary income first and then the gain. Against the gain each dollar deducted saves 20 to 25 cents, and the yearly ceiling means a large gain can take more than one year of drilling to cover. The 3.8% tax on the gain generally remains.

5. Exchange straight into oil and gas Deferral, not deduction

Mineral rights, royalties and working interests can be replacement property. You trade tenants for production income and keep the deferral. But exchange dollars carry your old basis, so they create no new write-off. Only fresh money spent on drilling does.

6. Hold until death Nothing to offset

The step-up in basis erases the deferred gain for your heirs. If that is the plan and you can live with the property, the tax problem solves itself.

Calculator: your tax bill and what a deduction is worth

Enter your own numbers. The top half estimates the tax on a sale with no exchange, or on the taxable part of a partial one. The bottom half shows what a first-year drilling deduction could take off that bill under the 2026 ceiling.

Want the full version?The 1031 exchange calculator starts from your sale price and basis, handles partial exchanges and boot, uses the 2026 brackets and your state, and shows what the Powder River wells could pay under four production cases.

The sale


New money into drilling

Estimated tax on the sale, no exchange
$0
Estimated federal tax a drilling deduction could remove
$0
Depreciation layer at 25%
$0
Remaining gain at your capital gains rate
$0
Net investment income tax
$0
State tax
$0
First-year drilling deduction
$0
Usable this year under the 2026 ceiling
$0
Carried forward to later years
$0
Sale tax less the deduction's value
$0

An estimate of arithmetic, not a tax return and not a projection. It applies the deduction to ordinary income first at the bracket you chose, then to the gain. It ignores bracket creep, AMT, state treatment of the deduction and selling costs, and it leaves the 3.8% tax in place. The deductible share varies by program and by when wells are drilled. Your adviser's numbers control.

Talk through these numbers with us

The catches

Every one of these belongs in the conversation with your CPA before any money moves.

Other ways out of a 1031 chain

Oil and gas is one tool. An honest list has others, and the right answer is often a mix.

The program we have open now

Everything above is general law. This part is our own business, so read it as such.

Open now · Wyoming

The Powder River program: three new wells beside one that is already producing

Kingdom Exploration is placing direct working interests in three new horizontal oil wells in Wyoming's Powder River Basin. All three are being drilled from the same pad as a well that has been producing since October 2025. Two go into the same rock as that well, and the third into a sandstone above it.

~130,000Barrels of oil from the neighboring well in its first 12 months, operator-reported
250+Barrels a day that well was still producing after a year, operator-reported
Nov. 19The date the drilling rig was set up on the pad, 2026

Why it is on a 1031 page. The program is built around the deductions described above. 100% of the cost to drill and complete the wells can be written off, about 88% of the investment: the labor, fuel and services on your 2026 return when paid by December 31 with drilling started by March 31, 2027, and the equipment through 100% bonus depreciation. For an owner with boot, a failed exchange or a final sale landing in 2026, that timing is the point.

If you want to use exchange funds themselves, a working interest is the kind of interest that can qualify as replacement property, but whether this one fits your exchange is a question for your qualified intermediary and tax adviser. We will give them whatever documents they need.

Only a limited share of the program is still open. Kingdom Exploration organizes the program and does not drill or operate wells; the wells are drilled by an independent operator already producing on this acreage. Production from the neighboring well is not a forecast for the new ones. No oil well is guaranteed, results vary from well to well, and you can lose your entire investment. For accredited investors only.

If you would rather check our homework first, Kingdom Scout is our free public map of US well records, and the page for CPAs and advisors sets out the same deductions with the statute behind each one. Send it to yours.

Tell us where your sale stands

We will send the Powder River program details and call you to talk through how the timing and the deductions line up with your sale. No cost, no obligation. We do not give tax advice, and we will tell you plainly if oil and gas is the wrong tool.

For accredited investors. By sending this form you agree that Kingdom Exploration may contact you by phone, text and email about its programs. We never sell contact details. See our privacy policy. This is not an offer to sell securities; offers are made only through definitive offering documents.

Got it. Thank you.

Your details are with us and we will be in touch shortly. You do not have to wait for the call: the Powder River program page has the proven well's production, the cost of each piece, what is still open and a calculator.

See the Powder River program

Thanks for being straight with us. Federal securities rules limit our drilling programs to accredited investors, so we cannot send program documents. Everything on this page still applies to your sale, and these are free:

Oil School, our audio course on how oil and gas investing works, and Ask the Tax AI for oil and gas tax questions.

Short answers

What is a 1031 exchange in simple terms?

It is a sale of business or investment real estate where the proceeds go into other business or investment real estate, so the gain is not taxed that year. The tax is postponed until you sell for cash, and your old basis carries into the new property.

What are the 45 day and 180 day rules?

You have 45 days from the closing of your sale to identify replacement property in writing, and 180 days from the same date to close on it. The 180 days ends sooner if your tax return for the year of the sale comes due first, unless you file an extension. Neither deadline moves for weekends or holidays.

Can you do a 1031 exchange into oil and gas?

Yes, for interests that count as real property. Mineral rights, royalties and working interests that last for the life of the lease or deposit generally qualify as like-kind to other real estate. Production payments, partnership units, fund shares and stock do not.

Can you 1031 exchange into mineral rights or royalties?

Generally yes. Mineral rights and perpetual royalty interests are treated as real property, so they can be replacement property for land or buildings. A royalty limited to a fixed term or a fixed dollar amount does not qualify. Use a qualified intermediary who has closed mineral exchanges before.

Do you get a drilling tax deduction on money that comes through a 1031 exchange?

No. Exchange proceeds carry your old basis into the replacement property, so they create no new write-off. The first-year deductions for intangible drilling costs and equipment come only from new money spent on drilling.

Can oil and gas deductions offset the gain from selling a rental property?

They can reduce it. Deductions from a directly held working interest reduce ordinary income first and then the gain, up to the 2026 ceiling of $512,000 on a joint return or $256,000 for a single filer. Any excess carries forward. The 3.8% net investment income tax on the gain generally remains.

What happens if my 1031 exchange fails?

The sale is taxed as an ordinary sale: up to 25% on past depreciation, capital gains rates on the rest, and the 3.8% net investment income tax where it applies. If the exchange began in one year and the funds were released in the next, the gain can often be reported in the later year.

What is boot in a 1031 exchange?

Boot is cash, debt relief or other non-like-kind property you receive in an exchange. It is taxable up to the amount of your gain, while the reinvested part of the exchange stays deferred.

Do I have to use a qualified intermediary?

In a delayed exchange, as a practical matter yes. If you or your agent receive or control the sale proceeds, the exchange fails. Your own attorney, accountant, real estate agent or employee from the past two years cannot act as the intermediary.

How do I get out of a 1031 exchange without paying tax?

There is no general way to cash out tax-free. The gain is erased only if you hold the property until death, when your heirs receive a stepped-up basis. Otherwise the choices are to keep deferring, to spread the gain with an installment sale, or to pair the sale with deductions such as drilling costs in the same tax year.

Sources and method

Statutes and regulations were read on the Cornell Legal Information Institute copy of Title 26 and IRS documents on irs.gov in November 2026. Dollar thresholds are the 2026 figures from Rev. Proc. 2025-32. Examples are our own arithmetic and are labeled as illustrations. Tax law changes, and state rules differ; check the current text and your own adviser before acting. If you find an error, call us and we will correct it.

  1. IRC §1031, exchange of real property held for productive use or investment. law.cornell.edu
  2. Internal Revenue Service, Like-Kind Exchanges: Real Estate Tax Tips. irs.gov
  3. IRC §1014, basis of property acquired from a decedent. law.cornell.edu
  4. Treas. Reg. §1.1031(k)-1, treatment of deferred exchanges (45 and 180 day periods, identification rules, qualified intermediaries, installment coordination). law.cornell.edu
  5. IRS Form 8824 and instructions, Like-Kind Exchanges. irs.gov
  6. IRS Topic No. 409, Capital Gains and Losses (unrecaptured section 1250 gain, 25% maximum rate). irs.gov
  7. Rev. Proc. 2025-32, inflation-adjusted items for 2026 (§3.03 capital gains rate thresholds, §4.31 excess business loss threshold). irs.gov
  8. IRS Topic No. 559, Net Investment Income Tax. irs.gov
  9. Cherry Bekaert, Tax Straddling and the Installment Method for a Failed Like-Kind Exchange. cbh.com
  10. Thompson & Knight (now Holland & Knight), Section 1031 Exchanges of Oil and Gas Interests. hklaw.com
  11. Treas. Reg. §1.1031(a)-3, definition of real property. law.cornell.edu
  12. JTC Group, Oil, Gas and Mineral Rights 1031 Exchanges, March 2026. jtcgroup.com
  13. IRC §263(c), intangible drilling and development costs. law.cornell.edu
  14. IRS Notice 2026-11, interim guidance on 100% additional first year depreciation under §168(k). irs.gov
  15. IRC §469(c)(3), working interests in oil and gas property. law.cornell.edu
  16. IRC §461(l), limitation on excess business losses of noncorporate taxpayers. law.cornell.edu
  17. IRC §613A, percentage depletion for independent producers and royalty owners. law.cornell.edu
  18. IRC §1254, gain from disposition of interest in oil, gas, geothermal or other mineral properties. law.cornell.edu
  19. IRC §57(a)(2), alternative minimum tax preference for intangible drilling costs. law.cornell.edu
  20. Rev. Rul. 2004-86, Delaware statutory trust interests as replacement property. irs.gov
  21. IRC §453, installment method. law.cornell.edu
Ask about my sale