
A shareholder took 95,000 out of their S corporation this year. The company earned 42,000. They started the year with 18,000 of stock basis, and they lent the company 50,000 two years ago.
How much of the 95,000 is taxable?
Most people's first instinct is that the loan covers it. It does not. The answer is 35,000 of gain, and the loan is irrelevant to the calculation.

The short answer
For an S corporation with no accumulated earnings and profits, distributions reduce the shareholder's stock basis. They are tax free to the extent of that basis.
Anything distributed beyond stock basis is treated as gain from the sale or exchange of property. For most shareholders that is capital gain, and long term if the stock has been held more than a year. It goes on the shareholder's own return.
In the example: 18,000 of beginning basis plus 42,000 of income gives 60,000 available. The first 60,000 of the distribution is tax free and takes stock basis to zero. The remaining 35,000 is gain.
Income goes in before the distribution comes out
The ordering matters, and it happens to work in the shareholder's favour.
For basis purposes, the year's income increases basis first, then distributions reduce it, then losses and deductions come last. That is why the 42,000 of income is available to cover the distribution even though it was earned over the same year the money came out.
The corollary is the one that surprises people in loss years. Because distributions come out before losses, a shareholder can take a fully tax free distribution and then find that a loss they expected to deduct is suspended, because the distribution already consumed the basis. We walked through the full order in the Form 7203 article.
The loan does not help
This is the most expensive misunderstanding in the area.
S corporation shareholders have two kinds of basis. Stock basis comes from contributions and income. Debt basis comes from loans the shareholder personally makes to the corporation.
Debt basis can absorb losses once stock basis runs out. It cannot absorb distributions. Distributions only ever run against stock basis. So the 50,000 the shareholder lent the company does nothing to shelter the 35,000 excess. It sits there, available for a future loss, while the distribution produces gain.
Worse, if debt basis was previously reduced by losses, repayment of that loan is itself partly taxable, because the shareholder is being repaid on a loan whose basis was already used. A shareholder who is both drawing distributions in excess of stock basis and being repaid on a reduced loan can have two separate taxable events in the same year.
Company debt gives no basis at all
Here is where preparers who work on both entity types cross their wires.
A partner's outside basis includes their share of partnership liabilities. That is what Item K on the partnership K-1 reports, and it is why a partner can take distributions funded by partnership borrowing without immediately recognising gain. We covered how those liabilities are split in K-1 Item K recourse vs nonrecourse.
S corporation shareholders get none of that. A bank loan to the S corporation adds nothing to any shareholder's basis, even if the shareholder personally guaranteed it. Only a loan the shareholder makes directly, from their own funds, creates debt basis.
So the common pattern goes like this. The S corporation borrows 200,000 from the bank, distributes it to the owner, and the owner reasons the way a partner would. But there is no basis from the bank debt, the distribution exceeds stock basis, and the excess is gain in the year it happened.
If the company used to be a C corporation
Everything above assumes no accumulated earnings and profits. A company that converted from C to S may carry earnings and profits from its C corporation years, and then the distribution passes through tiers.
First, the accumulated adjustments account, tax free to the extent of stock basis. Then accumulated earnings and profits, taxed as a dividend. Then any remaining stock basis, tax free. Then whatever is left, gain.
The same cash can produce four different tax answers depending on which tier it lands in, and the corporation's AAA balance on Schedule M-2 drives the first step. Our AAA vs retained earnings article covers what that account does and does not track.
Calling it a loan afterwards does not work
The instinct at year end is to reclassify the excess as a loan from the corporation to the shareholder. No distribution in excess of basis, no gain, problem solved.
That works only if it genuinely is a loan: a signed note, a stated interest rate, a repayment schedule, and repayments that actually happen. A journal entry made in March to move 35,000 from distributions to a shareholder receivable, with no note and no intention of repayment, is a distribution with a new label. It tends to be treated that way on examination, and the receivable that never gets repaid is the evidence.
If a real loan was intended, document it when the money leaves. If it was not, report the gain.
Where the corporation fits in
The S corporation reports distributions on each shareholder's K-1. It does not necessarily know the shareholder's basis, because basis depends on what the shareholder paid, what they contributed, and every prior year's history. The computation belongs to the shareholder and lands on Form 7203.
But the corporation controls the one input that corrupts everything downstream: whether distributions are recorded as distributions.
Where Ledger IQ fits
The most common reason a basis computation is quietly wrong is that owner draws were coded to an expense account because that is where money leaving the bank got put.
Coded that way the draw reduces ordinary business income, which understates the income that increases basis, and it never reaches the distribution line, which understates the distributions that reduce it. The two errors partly offset, the ending basis can look plausible, and the gain in excess of basis never gets reported.
In Ledger IQ, distributions map to their own named return line rather than dissolving into an expense account, and the mapping is a recorded decision on the workpaper instead of a bookkeeper's guess. Shareholder loans map separately from distributions, so money lent to the company and money taken out of it cannot silently net against each other.
The Working Trial Balance then puts ordinary business income and distributions on one screen, which is the comparison that tells you before the K-1s go out whether any shareholder is likely to be taking more than their basis can carry.
Ledger IQ supports Forms 1065, 1120S and 1120, with exports for Drake, Lacerte and UltraTax CS. It is free during early access, so you can try it at portal.ledgeriq.ai on a live client without a credit card.

