A person moves into a property on 9th Sep 2015 for a rent of £1300 per month. He pays money on 9th of each month. he vacates property on 5th of September 2018. As he had paid £1300 on 9th August 2018, he has overpaid his rent. There are two calculations to calculate the refund:
Calculation 1: Rent per day: 1300 * 12/42.74= 42.74. Days he overpaid his rent: 9 Sep-5 Sep=4 days. Rent refund due: 42.74 * 4 = 170.96
Calculation 2: Rent per day: 1300 * 12/42.74= 42.74. Days rent due=9 Aug to 5 Sep=28 days. Rent due=Daily rent * 28 = 1196.72. Rent Refund due=1300 - 1196.72 = 103.28
Which of the two is the correct calculation?
There's a few things going on here. First, you're double counting September 5 as both a day rent was due and a day being refunded. If the person moved out on September 5, the apartment was not available until September 6. I would support that September 5 should be counted as a rental day then, but this is a matter of opinion.
If rent is paid on the 9th then let's say that rental period starts the next day on the 10th. The above will depend on the lease terms.
With this he overpaid his rent 4 days and lived there 27 days not 28.
Also it looks like you are calculating daily rent as $$\dfrac{1300 \times 12}{365} \approx 42.74$$ But some months have 30 days and some have 31. The period of August 10 to September 9 is a 31 day period and that would make the rent due $31 \times 42.74 = 1324.94$. It is misleading to calculate daily rent as you have, it is more like an average daily rent. Also how do you handle leap years? Then a year has 366 days.
Here's how to unify the approaches. The daily rent for that month is $\dfrac{1300}{31} \approx 41.94$.
Approach 1: Amount overpaid is $4 \times 41.94 = 167.76$
Approach 2: Daily rent is $27 \times 41.94 = 1132.38$. Refund due is $1300 - 1132.38 = 167.62$.
With slight difference due to rounding error.
If this is a legitimate scenario and a not a hypothetical the terms of the lease should be checked.