You would divide everything into thirds, the basis (FMV at time of death), sales price and costs of sale, assuming you did not get a 1099-S with the full value in anyone's name. If you did, you would have to adjust the basis to prevent one person having the full gain.