The short answer
Yes, you can exchange a building that carries an SBA loan. The building your company occupies is real property held for productive use in a trade or business, which section 1031 covers, and the SBA loan is simply paid off from the sale proceeds at closing. Three things make it harder than an ordinary exchange: the payoff counts as debt relief you must offset with new debt or added cash, an early payoff can trigger a fee, and SBA rules will not finance a replacement your business does not occupy. Plan the replacement debt before you list the building.
At a glance
| Qualifying use | Real property held for productive use in a trade or business, so an owner-occupied building qualifies |
|---|---|
| Loan payoff | Treated as money received unless offset by new debt or cash you add |
| 7(a) early payoff fee | 5%, 3% or 1% of prepayments over 25% in years one to three, on loans of 15 years or more |
| 504 early payoff | Any prepayment premium is whatever the 504 note sets |
| 504 assumption | Allowed only with SBA's prior written approval; fee capped at 1% of the balance |
| Passive replacement | SBA does not lend to landlords that do not occupy the property, except Eligible Passive Companies |
| Occupancy for SBA replacement | At least 51% of an existing building; 60% of new construction |
| Exchanger | Whoever holds title: often an Eligible Passive Company, not the operating business |
The building qualifies because your business used it; the SBA loan changes the arithmetic, not the eligibility
Section 1031(a)(1) defers gain on real property 'held for productive use in a trade or business or for investment' when it is exchanged for like-kind real property. A building your own company occupied meets the first half of that test even though you never collected rent from an outside tenant. Nothing in the statute or the SBA regulations treats SBA financing as a bar.
What the SBA loan does change is the money flow at closing. The title company pays the lender off from the buyer's funds, and only the net proceeds go to your qualified intermediary. Under Reg. section 1.1031(b)-1(c), a liability you are relieved of is treated as money received, so the payoff is part of what you must replace.
Check who actually holds title before anything else. Many SBA borrowers own the real estate in a separate entity that leases it to the operating company. That landlord entity is the taxpayer that must sell, identify and buy, and the same-taxpayer rule applies to it, not to the business that occupies the space.
An early payoff can carry an SBA fee, and the timing of your sale decides whether it applies
For 7(a) loans, 13 CFR 120.223 imposes a subsidy recoupment fee, usually called the prepayment penalty, when three conditions are all met: the loan has a maturity of 15 years or more, you prepay during one of the first three 12-month periods after first disbursement, and the prepayment exceeds 25% of the highest outstanding balance in that period. The charge is 5% of the prepayments in the first year, 3% in the second and 1% in the third. A sale that pays the loan off in full after the third year triggers no SBA fee under this rule.
504 loans work differently. Under 13 CFR 120.940, the borrower may prepay only by paying the entire principal balance, unpaid interest, unpaid fees and 'any prepayment premium established in the note.' Read the 504 note and the bank's first-lien note separately; the bank portion of a 504 project carries whatever prepayment terms the bank wrote.
Hypothetical: a 7(a) loan with a 25-year term has a $600,000 balance when the building sells in month 20, inside the second 12-month period. The fee is 3% of $600,000, or $18,000, paid from the proceeds at closing. Whether your CPA treats that charge as a selling expense that reduces the amount realized is a question to settle before closing; run your own numbers with your CPA.
The loan payoff is debt relief: replace it with new debt or your own cash, or part of the gain is taxed
Reg. section 1.1031(d)-2, Example 1 shows the mechanics: an owner who transfers a building subject to a $150,000 mortgage is treated as receiving $150,000, and that amount is recognized to the extent of the gain unless it is offset. Under Reg. section 1.1031(b)-1(c), debt you take on with the replacement offsets debt you were relieved of, and cash you add offsets it too.
Hypothetical: the building sells for $2,000,000 with $100,000 of selling costs and a $900,000 SBA and bank payoff, leaving $1,000,000 for the intermediary. To defer all of the gain you buy at least $1,900,000 of replacement property, put in the full $1,000,000, and cover the other $900,000 with new debt or added cash. The Exchange Equation walks through the same balance in more detail; run your own numbers with your CPA.
If the new lender will lend less than the old balance, the gap is taxable mortgage boot unless you fill it with cash. Deleveraging with a 1031 covers what happens when you deliberately take on less debt.
SBA will finance an owner-occupied replacement but not a passive one, which shapes the replacement you can buy
13 CFR 120.110(c) makes ineligible any passive business owned by developers and landlords that do not actively use or occupy the assets acquired with the loan, except Eligible Passive Companies. Under 13 CFR 120.111, an Eligible Passive Company must lease the property to an operating company for that company's business, under a written lease subordinate to SBA's lien, with the rents assigned as collateral.
Occupancy thresholds follow in 13 CFR 120.131: for an existing building the borrower must permanently occupy and use at least 51% and may lease up to 49%; for new construction it must occupy at least 60% and may lease up to 20% permanently. If you are moving the business into a larger building, SBA financing for the replacement remains possible. If you are retiring from the business and buying a rental, a net-leased building or a DST, it is not.
For a passive replacement the debt has to come from a conventional or commercial lender, from your own cash, or from a DST's existing loan. Under Rev. Rul. 2004-86 a DST owner holds an undivided fractional interest in the real estate, and the trust's nonrecourse loan comes with it; whether a DST loan counts as replacement debt explains the allocation.
Sequence the payoff letter, the lender conversations and the identification before the 45-day clock starts
An SBA borrower usually has more parties to coordinate than a landlord with one bank loan. Order the work so nothing is decided under deadline pressure.
- Request payoff statements for every loan on the property, and ask each lender in writing whether a prepayment fee or premium applies on your expected closing date.
- If the buyer wants to assume a 504 loan, start early: 13 CFR 120.937 allows assumption only with SBA's prior written approval, and 120.971 caps the assumption fee at 1% of the balance.
- Confirm which entity holds title and make sure that same entity signs the exchange agreement with the qualified intermediary before closing.
- Get a replacement-loan term sheet before listing; your identification on day 45 must be property you can actually finance by day 180.
- If the business is moving, check the 51% occupancy test against the replacement building's floor plan before you identify it.
Related questions
Do I need SBA's permission to sell the building?
A sale that pays the loan off in full closes the SBA loan; the payoff statement and lien release come from the lender. Consent matters when a buyer wants to take over a 504 loan, which 13 CFR 120.937 allows only with SBA's prior written approval.
Is the 7(a) prepayment fee charged if I sell in year four?
Not under 13 CFR 120.223, which applies only to prepayments during the first three 12-month periods after first disbursement on loans with a maturity of 15 years or more. Your bank note or a 504 note can still contain its own prepayment terms.
Can I use an SBA loan to buy a DST or a rental as my replacement?
No. SBA treats a landlord that does not occupy the property as an ineligible passive business, and a DST interest is passive by design. The replacement debt has to come from another lender, from the DST's own loan, or from cash you add.
Our real estate is in a separate LLC that leases to our company. Who does the exchange?
The LLC that holds title. If it has two or more members it is a partnership by default, so the partnership exchanges and the members cannot split off and exchange separately without restructuring well ahead of the sale; see drop-and-swap strategies.
What if my new loan is smaller than the SBA payoff?
Add cash equal to the shortfall, or the shortfall is mortgage boot taxed up to the amount of your gain. Refinance timing around a 1031 covers why borrowing against the old building just before the sale does not solve this.
Sources
Checked against these publications on September 30, 2026. Rules and figures change; confirm the current version with your CPA or attorney before you act. This page is general information, not tax or legal advice.
- 26 U.S.C. Section 1031 (Cornell LII)
- Treas. Reg. Section 1.1031(b)-1, assumption of liabilities treated as money
- Treas. Reg. Section 1.1031(d)-2, treatment of assumption of liabilities (examples)
- 13 CFR 120.223, subsidy recoupment fee on 7(a) prepayments
- 13 CFR 120.110, businesses ineligible for SBA loans
- 13 CFR 120.131, leasing part of the property
- 13 CFR Part 120 (eCFR): 120.111 Eligible Passive Companies, 120.937 assumption, 120.940 prepayment, 120.971 fees
- Rev. Rul. 2004-86, Delaware statutory trusts
