StockAvg

Selling Stock to Pay Off Debt

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.

The position you would sell

Shares
Buy price per share What these shares cost you. This is what the gain is measured from.
Sell price per share No price feed anywhere on this page. Both prices are yours to type.

The debt, and the tax

Debt you want to pay off The balance to clear, as one figure. The page does not model interest accruing while you decide.
Tax rate on the gain — as a percent, yours to type This page holds no tax table and picks no bracket: it multiplies the gain by whatever rate you type. The rate depends on how long you held the shares, what else you earned and where you file, so the page asks rather than guesses. Leave it empty and the tax line stays zero.
Total cost —
Taxable gain —
Tax on the sale — at your rate —
Left after tax —
Difference to the debt — over or short —

Enter the sale and the debt to see whether the money left after tax clears it.

Why the comparison is the tax, not the balance

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.

What each figure is

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.

Worked example

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.

One sale against three debts

One sale of 400 shares bought at 40.00 and sold at 65.00, which leaves 24,500.00 after tax at 15.00%, set against three different balances. The sale does not move: the dashed line stays where it is, and the debts move against it.

One sale against three debts The same sale, 400 shares bought at 40.00 and sold at 65.00 with tax at 15.00%, leaves 24,500.00 after tax. Against a debt of 20,000.00 that is 4,500.00 left over; against 24,500.00 it lands exactly even; against 30,000.00 it falls 5,500.00 short, needing 89.7960 more shares. One sale, three debts: what the after-tax money reaches One sale, 400 shares bought at 40.00 and sold at 65.00, tax at 15.00%: 24,500.00 after tax. Blue: what the sale covers. Red: what it does not reach. Grey: money left over. 20,000.00 debt +4,500.00 left over 24,500.00 debt nothing over, nothing short 30,000.00 debt 5,500.00 short 89.7960 more shares needed after tax: 24,500.00

Nothing about the sale changes between the three rows, and everything about the answer does. The shares raise 26,000.00, the 10,000.00 gain costs 1,500.00 at 15.00%, and 24,500.00 is what is left to pay a debt with. Against a balance of 20,000.00 that clears it with 4,500.00 to spare. Against 24,500.00 it lands exactly even, not a cent either way. Against 30,000.00 it falls 5,500.00 short.

That last row is where the second question starts, because closing it is not the gap divided by the share price. Each additional share sells for 65.00 but carries 25.00 of further gain, taxed at the same 15.00%, so it hands you 61.2500 of cash rather than 65.00. The 5,500.00 needs 89.7960 more shares: they raise 5,836.74, attract 336.73 of further tax, and bring the after-tax total to 30,000.01, clearing the debt by 0.01. Sell one share fewer and it stays short, which is why that figure rounds up and nothing else on the page does.

Change only the rate on that same sale and the answer moves twice over, because the rate makes the gap bigger and makes each extra share worth less once it is sold. At 0.00% the sale is 1,000.00 short and 18.1819 more shares close it. At 15.00% the gap is 1,750.00 and the count is 34.1464. At 20.00% it is 2,000.00 and 40.0000. At 37.00% the gap is 2,850.00 and the count is 62.2951, which is 3.4262 times the 0.00% figure, while the rate itself went from nothing to 37.00%. The gain is the same 5,000.00 in all four rows: the only thing that changes is the rate typed into the box.

The same sale, 200 shares bought at 30.00 and sold at 55.00 against a 12,000.00 balance, with only the tax rate changed. The gain stays 5,000.00 in every column; the gap and the extra shares both move.

One sale, four tax rates, and the extra shares needed 200 shares bought at 30.00 and sold at 55.00 leave 11,000.00 before tax, against a 12,000.00 balance. At 0.00% the gap is 1,000.00 and 18.1819 more shares close it; at 15.00% the gap is 1,750.00 and 34.1464; at 20.00% the gap is 2,000.00 and 40.0000; at 37.00% the gap is 2,850.00 and 62.2951. The gain is 5,000.00 in all four. One sale, four rates: how many more shares close the gap 200 shares bought at 30.00 and sold at 55.00, paying off 12,000.00. The gain is 5,000.00 in every column. 18.1819 34.1464 40.0000 62.2951 0.00% 15.00% 20.00% 37.00% gap 1,000.00 gap 1,750.00 gap 2,000.00 gap 2,850.00 Each extra share sells for 55.00 and carries 25.00 of gain, so the rate takes 25.00 × rate off every one of them. Bar heights are the share counts above. Figures are cut down, never rounded up, except the count that closes the gap.

What this page does not do

Rounding

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.

Frequently asked questions

Should I sell stock to pay off debt?

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.

How much tax will I pay if I sell to pay off a card?

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.

Why does the sale fall short when the shares are worth more than the debt?

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.

How much more would I need to sell?

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