Rebate 87a for STCG/LTCG?

If the aggregate income is less than 5Lakhs and when we add the STCG/LTCG the net income goes above the 5 Lakh limit for tax rebate.

In this scenario how the rebate is applicable

Example:
Aggregate income - 4.5L
STCG- 1 L
Total Taxable income- 5.5L

Do I need to pay tax for 4.5L and 15% STCG or Only 15% STCG , Rebate applicable for 4.5L

2 posts were merged into an existing topic: Claiming Rebate under section 87A