The least of three amounts
Your HRA exemption is the lowest of three figures: the actual HRA you receive, the rent you pay minus 10% of your basic, and 50% of basic (in metros) or 40% (elsewhere). Whatever is left over is taxable. HRA exemption applies under the old regime only.
Common questions
It is the least of: actual HRA received, rent paid minus 10% of basic, or 50% of basic (metro) / 40% (non-metro).
For HRA, the metros are Delhi, Mumbai, Kolkata and Chennai, where the 50% limit applies. Everywhere else uses 40%.
No. HRA exemption is only available under the old regime. If you opt for the new regime, you cannot claim it.