Tax Deduction And Capital Gains: A Comprehensive Analysis