Capital Gains and Dividend Tax
Finds: the tax cost of a sale and of dividends.
When to use it: Use it to estimate the tax cost of selling or of holding income-paying investments. Holding past the long-term threshold often cuts the rate, and losses can offset gains. Rules differ widely by country (some have no capital gains tax, others tax gains as ordinary income), so enter the rates and thresholds from your own tax rules. The rates below are illustrative.
The formula
In words: Capital gain = sale proceeds − cost basis; Taxable gain = gain minus any capital losses used against it (not below 0); Tax = capital gains rate (short-term or long-term depending on holding period) x taxable gain + dividend tax rate x dividends
What each symbol means
| P | Sale proceeds | money |
| Basis | What you paid, plus eligible costs | money |
| r_cg | Capital gains rate: usually lower if held more than a set period (for example one year) | percent |
| r_d | Tax rate on dividends | percent |
Worked example
You sell shares bought for 8,000 for 15,000, and you also received 1,200 of dividends. You have a 500 capital loss to use. The short-term rate is 32% and the long-term rate is 15%; dividends are taxed at 15%.
| Capital gain | 15,000 − 8,000 | 7,000 |
| Taxable gain after losses | max(7,000 − 500, 0) | 6,500 |
| Rate applied | 0.15 if 1==1 else 0.32 | 15% |
| Tax on the gain | 6,500 × 0.15 | 975 |
| Tax on dividends | 1,200 × 0.15 | 180 |
| Total tax | 975 + 180 | 1,155 |
| Kept from the sale after tax on the gain | 15,000 − 975 | 14,025 |
| Tax on the gain if short-term | 6,500 × 0.32 | 2,080 |
| Saving from the long-term rate | 2,080 − 6,500 × 0.15 | 1,105 |
The gain is 7,000, and 6,500 is taxable after using the loss. At the 15.0% rate the tax on the gain is 975, plus 180 on dividends, so 1,155 in total. After tax you keep 14,025 from the sale. Had the shares been held short-term, the tax on the gain would have been 2,080, a difference of 1,105.