Under Section 54, only long-term capital gains—not the full sale proceeds—need to be invested to claim tax exemption. You can ...