Zero tax limit of Rs. 12 lakhs and Capital Gain (STCG)

If we modify the original question to the below inputs, what will be the tax liability?

• Pension income of ₹10,00,000
• Interest income of ₹1,50,000
• Short-term capital gains (STCG) on Equity u/s 111A of ₹40,000 (20% tax rate)
• Long-term capital gains (LTCG) on Equity u/s 112A of ₹15,000

For checking 87A applicability, what will be the income in the above case: ₹11,50,000 or ₹11,65,000?
@Diti_Savalia

Can total income for marginal relief calculation and 87A calculation be different?
Is marginal relief calculated by including incomes on which tax is calculated at special rates?
Net Total Income under All heads (for marginal relief calculation): Rs. ₹12,05,000?
What will be the tax liability in this case? @Sakshi_Jain
₹8,000 + 4% cess OR
₹5,000 + 4% cess?

So, if a person’s salary is 11,50,000. Should LTCG of Rs. 1,25,000 in equity be booked by this person or should it be left to keep margin of safety if the income tax portal this year also disallows 87A applicability citing some reasons or performs its own calculations for marginal relief?