Calculation of Notice In Lieu

If I have a staff resigned and last day is on 31/5. He wants to leave company earlier on 15/5. The period from 16/5 - 31/5 will be notice in lieu? What is the computation for staff final salary if mthly salary is $2500?

Formula A
To calculate the salary from 1 May to 15 May, please use the following formula:-
(Total no. actual worked / total no. working days in a month) x monthly salary

Formula B
To calculate the notice in lieu to be paid by the employee, please use the following formula:-
(12 / 52 x number of working days required to work in a week) x monthly salary

Final Computation = Amount from Formula A - Amount from Formula B