To calculate the gain on repayment of a shareholder loan, you only have a taxable event if the loan is a genuine debt whose basis was reduced below its face amount, usually because an S corporation’s passed-through losses ate into it. When that has happened, each repayment is split pro-rata: divide your adjusted debt basis by the loan’s face amount to get the tax-free percentage, and the remainder is taxable gain. A straight repayment of a loan whose basis still equals its face amount produces no gain at all.
The Pro-Rata Formula
The calculation comes from Revenue Ruling 64-162 and applies to every repayment on the same loan, whether the corporation pays in one lump sum or in installments over years. The ratio is fixed at the moment of the payment and applied dollar by dollar.
- Tax-free percentage = adjusted debt basis ÷ face amount of the loan
- Taxable percentage = 100% − tax-free percentage
- For each payment: multiply the payment by each percentage to split it between tax-free basis recovery and recognized gain
After each payment, reduce your adjusted debt basis by the tax-free portion you just recovered. The face amount does not change until the loan is paid off. If basis moves between payments because of new pass-through income or losses, recompute the ratio at the time of the next payment.
Worked Example
You lent $100,000 to your S corporation under a written promissory note. Over several years, passed-through losses reduced your debt basis from $100,000 to $40,000. The corporation still owes you the full $100,000 face amount.
Your tax-free percentage is $40,000 ÷ $100,000 = 40%. The taxable percentage is 60%. On a $10,000 repayment, $4,000 is a tax-free return of basis and $6,000 is taxable gain. Your adjusted debt basis then falls from $40,000 to $36,000 (reduced by the $4,000 recovered, not by the full $10,000 paid). Unless basis changes in the meantime, the next payment uses the same 40/60 split.
The rule exists to stop shareholders from labeling early payments as pure basis recovery and pushing all the gain to a final payment that may never come. Every dollar coming back carries its share of the embedded gain.
Why Debt Basis Is What Drives the Gain
A shareholder creates debt basis by personally advancing money to an S corporation, and the initial basis equals the face amount of the loan. Guaranteeing a third-party loan to the corporation does not create debt basis; the shareholder has to make an actual economic outlay.1Internal Revenue Service. S Corporation Stock and Debt Basis
Pass-through losses can only be deducted up to the sum of stock basis and debt basis.2Office of the Law Revision Counsel. 26 USC 1366 – Pass-Thru of Items to Shareholders They reduce stock basis first, then debt basis.3Office of the Law Revision Counsel. 26 USC 1367 – Adjustments to Basis of Stock of Shareholders, Etc. Once debt basis has been reduced, repayment of the loan claws back the double benefit the shareholder would otherwise get: a deduction for the loss plus a tax-free return of the same dollars.
Debt basis can be restored when the corporation later earns income, but only to the extent of the year’s “net increase” after income and adjustments are first applied to stock basis. Debt basis must be fully rebuilt before net increase can push stock basis above zero.3Office of the Law Revision Counsel. 26 USC 1367 – Adjustments to Basis of Stock of Shareholders, Etc. If the corporation earns $50,000 and distributes $50,000 the same year, net increase is zero and no debt basis is restored. Watch this if you are counting on current-year profits to shrink the taxable percentage on an upcoming repayment.
Capital Gain or Ordinary Income
The character of the gain depends on how the loan was documented. A written promissory note is treated as a capital asset in the shareholder’s hands, so its repayment is treated as a sale or exchange, and the gain is capital gain. If you held the note for more than 12 months, it qualifies as long-term capital gain.4The Tax Adviser. Avoiding Gain at the S Shareholder Level When a Loan Is Repaid
An informal open account advance with no separate written instrument produces ordinary income instead. The rate gap is meaningful. For 2026, long-term capital gains top out at 20%, while ordinary rates go up to 39.6%.5Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates On a $60,000 gain, the difference can easily exceed $10,000. A signed note on every shareholder advance is inexpensive tax planning.
Open account debt has its own rules. Advances not backed by a separate instrument qualify as open account only while the aggregate outstanding principal stays at or below $25,000 at year-end. Advances and repayments during the year are netted at year-end. If the balance exceeds $25,000 at any year-end, the debt permanently converts to instrument-like treatment for all future years.6GovInfo. Treasury Regulation 1.1367-2 Netting can actually help: a $15,000 advance and a $10,000 repayment in the same year become a $5,000 net advance at year-end, with no separate gain event on the $10,000.
When the Whole Repayment Can Be Taxable
The pro-rata calculation assumes the advance was genuine debt. If the IRS reclassifies it as equity, the analysis changes entirely: every dollar the corporation pays back is a distribution rather than a return of principal. For a C corporation, that distribution is a dividend to the extent of earnings and profits. For an S corporation with no accumulated earnings and profits from prior C years, distributions are tax-free up to stock basis and taxed as gain beyond it. Where accumulated earnings and profits exist, distributions run first through the accumulated adjustments account, then as dividends up to accumulated E&P, and any remainder reduces stock basis or produces gain.7Office of the Law Revision Counsel. 26 USC 1368 – Distributions
Recharacterization turns on economic substance, not labels. Factors that push toward genuine debt treatment include a signed promissory note with a fixed principal amount, a stated maturity date, an arm’s-length interest rate, an actual history of principal and interest payments (and enforcement when they are missed), and a reasonable debt-to-equity ratio. Missing one factor is rarely fatal; missing several usually is. If you never papered the loan, never charged interest, and never took a payment, the IRS has a strong argument that no genuine creditor relationship existed.
Timing Moves That Shrink the Gain
Because the taxable percentage is set by the ratio of adjusted debt basis to face amount at the time of payment, anything that restores debt basis before the cash moves reduces the gain.
Delay repayment until after a profitable year. Pass-through income restores debt basis, and if a full year of profits rebuilds basis to the face amount, the repayment becomes entirely tax-free. Even partial restoration reduces the taxable percentage on every payment that follows.4The Tax Adviser. Avoiding Gain at the S Shareholder Level When a Loan Is Repaid The income has to pass through before the repayment, not in the same year after it.
Limit distributions during the restoration year. Because net increase is calculated after stock basis absorbs income and distributions, a large same-year distribution can zero out net increase and leave debt basis unrestored. Consider deferring distributions or sequencing them to occur after the loan repayment.
Harvest capital losses to offset capital gain. When the loan is documented with a written note and the gain is capital, other realized capital losses in the same year can offset it. That does not shrink the gain itself, but it can neutralize the tax owed.
How to Report the Gain
The shareholder does the basis math, not the corporation. The Schedule K-1 gives you the income and loss items you need, but it will not tell you whether a loan repayment produced gain.
Form 7203 (S Corporation Shareholder Stock and Debt Basis Limitations) is required with your individual return when you receive a loan repayment, claim a pass-through loss, take a non-dividend distribution, or dispose of S corporation stock.8Internal Revenue Service. About Form 7203, S Corporation Shareholder Stock and Debt Basis Limitations The form walks through opening basis, increases from income, decreases from losses and distributions, and the resulting adjusted basis, and it produces the numbers that determine whether a repayment is taxable.
If the resulting gain is capital, it goes on Schedule D with supporting detail on Form 8949.9Internal Revenue Service. Instructions for Schedule D (Form 1040) If it is ordinary income (open account advance, no written note), report it on the appropriate income line of Form 1040. If the transaction is recharacterized as a corporate distribution, the corporation reports a dividend on Form 1099-DIV and you pick it up as dividend income.