How would I calculate the exemption u/s 54F in case only a part of the sales proceeds, and not the whole amount is invested in the residential property?

How would I calculate the exemption u/s 54F in case only a part of the sales proceeds, and not the whole amount is invested in the residential property?

In this case, the exemption on capital gain will be allowed in proportion to the sales proceeds invested in residential property, i.e.

Exemption Amt = Capital gain × (Amount invested/Net Sale consideration).