The position you would sell
The debt, and the tax
Enter the sale and the debt to see whether the money left after tax clears it.
The decision is usually argued in prose — sell or do not sell, and here are the pros and cons. The comparison it turns on is arithmetic: what the sale actually raises after tax, set against the debt you want gone. That is what this page does. Enter the position, the payoff and the rate you want applied, and it prints what the sale raises, the tax it drags with it, what is left once the tax is paid, whether that clears the debt, and — when it does not — how much more you would have to sell at the same price to close the gap.
Enter the sale and the debt to see whether the money left after tax clears it.
The reason this comes out as a gap rather than a yes or no is that the debt is a fixed number and the sale is not. You know what you owe — that is the target. What you do not know, until you work it out, is what the position actually raises once the tax on the gain has been paid.
And the tax is not a side note; it can be the difference between clearing the debt and not clearing it. Sell a position with a large built-in gain and the tax can take a meaningful bite out of what the sale pays you, so a sale that looks big enough to clear the balance in the raw numbers can come up short once the tax is taken off. Sell at a loss and there is no tax on it at all, so the full proceeds go to the debt. Two positions can be worth the same and raise very different amounts to pay a debt with, purely on the gain sitting inside them.
That is why the page asks for your buy price as well as your sell price. Without the buy price there is no gain, and without the gain there is no tax, and the whole comparison collapses to "the shares are worth X" — which is the version of the question that hides the part that decides it.
When it falls short, the page also answers the question that follows: how much more you would have to sell, at the same price, to close the gap. It works that out from the net cash each additional share produces — the sell price, less the tax the extra gain attracts at the same rate — and rounds up to the next fraction of a share, because selling a fraction less than that would still leave the debt short.
200 shares bought at 30.00 and sold at 55.00, to clear a debt of 12,000.00, with the tax rate typed as 15.00%.
Total cost is 200 × 30.00 = 6,000.00. Proceeds are 200 × 55.00 = 11,000.00, so the taxable gain is 11,000.00 − 6,000.00 = 5,000.00. The tax is 5,000.00 × 0.15 = 750.00, which leaves 11,000.00 − 750.00 = 10,250.00 after tax. Set against the 12,000.00 debt, that is 1,750.00 short.
To close it at the same price: each additional share sells for 55.00 and carries 25.00 of gain, taxed at 15.00% for 3.75, so it contributes 55.00 − 3.75 = 51.25 of net cash. The 1,750.00 gap needs 1,750.00 ÷ 51.25 = 34.1464 shares, rounded up — about 34.15 more shares. Those extra shares raise 1,878.05 and attract 128.04 of tax, bringing the after-tax total to 12,000.01 and clearing the debt.
The same sale that looked like it cleared 12,000.00 by raising 11,000.00 in fact needed about 34 more shares, because the tax sits between the proceeds and the payoff.
Figures are rounded down, never up — the same rule as the rest of the site. Share counts and per-share prices to four decimals, amounts and percentages to two. The one figure that rounds up is the extra share count needed to close the gap, because rounding that down would leave the debt short of the target.
This page does not answer that, and it would not be honest if it did — the right answer depends on the interest on the debt, the return you expect on the shares, your time horizon and how much of a cushion you want to keep, none of which are numbers the page asks for. What it does is settle the part of the question that is arithmetic: whether the sale, after the tax on the gain, actually covers the debt, and by how much it falls short or overshoots. That figure is usually the one the decision hinges on, and it is the one a pros-and-cons list leaves out.
The gain times the rate you type. The gain is the proceeds less what the shares cost you, and the rate is yours to supply. On a sale of 200 shares bought at 30.00 and sold at 55.00, the gain is 5,000.00; at 15.00% the tax is 750.00, so 10,250.00 goes to the debt out of the 11,000.00 the sale raised. If the shares were sold at a loss there is no gain and no tax on the sale, and the full proceeds are available.
Because the tax comes out before the debt does. In the example above the shares are worth 11,000.00 and the debt is 12,000.00 — already short before tax — but the reverse can also happen: shares worth more than the debt can still fall short once the tax on a large gain is taken off. Take the same sale to clear a debt of 10,500.00: 11,000.00 of shares looks like it covers it, but after the 750.00 tax only 10,250.00 is left, which is 250.00 short. The tax, not the balance, is what moved the answer.
Enough shares that the net cash they produce covers the shortfall — and because each additional share carries its own gain and its own tax, it is not simply the gap divided by the share price. On the example above the gap is 1,750.00 and each extra share nets 51.25 after tax, so about 34.15 more shares are needed. The page works this out for whatever figures you enter, and tells you when selling more at that price could not close the gap at all.
This page is a calculator, not investment or tax advice. Contact: contact@stockavg.com