Get your taxes done using TurboTax

Capital gains is selling price less selling costs less value on date of death. 

The estate files a estate tax return (Form 1041) and any tax obligation is passed to the beneficiaries on a K-1 which is reported by each beneficiary on their respective tax return