- 50ish% back after deducting the given unappreciated basis,
- Selling the short-term gains would cost you half the profit, so the charitable deduction gets you roughly 100% of the after-tax profit from the trade back in your pocket.
(Plus the upside of sending money to charity.)
The math doesn't work out for long-term gains though, and obviously works best when the asset has appreciated strongly. Not sure about the legal treatment of partially-donated options spreads or other complex hedging tricks to manufacture these gains and offset them against a loss.
Not tax advice etc, all just guesswork.
that said, donating stock that has a long-term capital gain is still extremely tax advantageous.
This creates a complexity nightmare - as you end up with basis changes for s corp pass-thru's etc that are not tied to anything "real" - ie, no additional contribution of assets or payment of tax on accumulated gains. This all makes things very complicated from recordkeeping, reconciliation and auditing perspectives.