The three figures, and which one usually binds
The exemption is the smallest of: the HRA actually received; rent paid minus 10% of basic salary; and 50% of basic in a metro or 40% elsewhere. All three are calculated and the lowest wins.
For most salaried people the second is the binding one, which produces a counter-intuitive result: if your rent is less than 10% of your basic, the exemption is nil regardless of how much HRA you receive. The allowance is not a deduction for having HRA in your structure — it is relief for rent actually paid.