Most taxpayers do not fall into the 3.8% Medicare surtax which is assessed on net investment income when the taxpayer has an adjusted gross income of over $200,000 for singles and $250,000 for married filing jointly. Net investment income includes interest, dividends, capital gains and certain passive investment income.
Occasionally a taxpayer with income below the hurtle rate will have a windfall transaction that pushes them above the AGI limit and triggers the tax.
One way to avoid the Medicare surtax is to donate appreciated stock or bonds rather than selling them, creating a charitable donation and avoiding receipt of the net investment income. The charitable gift may not be fully deductible in the tax year, but by avoiding the direct receipt of the proceeds the taxpayer avoids the 3.8% Medicare tax and capital gains tax on the appreciation in the investment. The charitable contribution is the market value of the stock not the basis in the stock. Community foundations and more significant charitable organizations are able to facilitate a donation of stock or bonds.
Charitable gifts may only be deducted up to 50% of the adjusted gross income with some limitations but the portion that is not immediately deductible may be carried forward.