How to calculate salary from attendance and work hours
· Updated · 5 min read · WorkDesk team
At the end of every month someone has to turn attendance into salary. Done by hand, it takes days and causes arguments. With a clear method and good attendance data, it takes minutes.
This guide shows a common method. Your company's policy, contracts and local rules come first; check them with your accountant.
Step 1: Choose how to count days
Companies usually use one of these:
- Calendar days: monthly salary divided by the days in the month (28 to 31)
- Fixed 30 days: monthly salary divided by 30, every month
- Working days: monthly salary divided by the working days in that month
Pick one, write it in your policy, and use it every month.
Step 2: Count paid days
Paid days usually include:
- Days worked
- Weekly offs and holidays (with calendar-day or 30-day methods)
- Approved paid leave
Unpaid leave and unexplained absences are not paid days. Half days count as half.
Step 3: Apply late marks and overtime
Write simple rules, for example:
- Three late marks in a month count as a half day
- Overtime is paid per hour at an agreed rate, only when approved
A worked example
Monthly salary: 30,000. Method: fixed 30 days, so one day is worth 1,000.
- Days in the month counted as paid: 30
- Unpaid leave: 2 days, minus 2,000
- One half day: minus 500
- Approved overtime: 4 hours at 150 per hour, plus 600
Salary for the month: 30,000 - 2,000 - 500 + 600 = 28,100
The same salary with each method
The method you choose changes the per-day rate, and so every deduction. For a salary of 30,000 in a 31-day month with 26 working days:
- Calendar days: 30,000 ÷ 31 = about 968 a day
- Fixed 30 days: 30,000 ÷ 30 = 1,000 a day
- Working days: 30,000 ÷ 26 = about 1,154 a day
Two days of unpaid leave therefore cost 1,936, 2,000 or 2,308 depending on the method. None is wrong; what matters is using the same one every month and writing it in the offer letter or policy.
Loss of pay (LOP) explained
Loss of pay, or LOP, is the salary deducted for unpaid days. It usually covers:
- Unpaid leave, or leave taken after the paid balance is used up
- Absence without approved leave
- Half days, at half the per-day rate
- Late-mark penalties, if your policy converts them to half days
LOP = per-day rate × unpaid days
In the worked example above, LOP was 2,000 + 500 = 2,500.
Calculating salary for hourly workers
For people paid by the hour, the maths is simpler but the data matters more:
Pay = hours worked × hourly rate + overtime hours × overtime rate
Example: 168 hours at 150 an hour is 25,200. Ten approved overtime hours at 225 (1.5 times) add 2,250, for 27,450.
Use only tracked working time, not idle time, and include approved offline time such as client visits.
A note on overtime rules
Overtime rules depend on the kind of business and the state. In factories, the Factories Act sets overtime at twice the ordinary rate. Shops and offices follow their state's Shops and Establishments Act. Many companies also set their own rate for staff not covered by these rules. Check with your accountant and write the rate in your policy.
Mid-month joiners and leavers
For someone who joins on the 11th of a 30-day month, pay only the days from the joining date. With the fixed 30-day method and a salary of 30,000, 20 days give 20,000. Do the same in reverse for the last month of someone who leaves.
Month-end payroll checklist
- Lock attendance for the month: no more edits after a set date
- Approve or reject all pending leave and offline time requests
- Approve overtime
- Check late marks and half days against the policy
- Export the report and send it to your accountant
- Share each employee's attendance summary, so mistakes are raised before payment
Where the mistakes come from
Most payroll errors are not maths errors. They come from wrong attendance: a forgotten register entry, leave approved on WhatsApp but never recorded, overtime nobody wrote down. Fix the attendance data and payroll fixes itself.
Let software do the counting
Attendance software records worked days, half days, late marks, leave and overtime as they happen, so the monthly report is ready on the last day.
WorkDesk turns automatic time tracking into attendance, leave and overtime, and works out pay from tracked hours, hourly or monthly, with your overtime rules. Export the month to Excel, CSV or PDF for your accountant. See pricing.
Frequently asked questions
How do I calculate per-day salary?
Divide the monthly salary by the number of days your policy uses: calendar days in the month, a fixed 30, or the working days in that month. Use the same method every month.
How is loss of pay (LOP) calculated?
LOP = per-day rate × unpaid days. Unpaid leave and unapproved absences count as full days, half days as half. With a 30,000 salary on the 30-day method, 2 unpaid days are 2,000.
How is overtime pay calculated in India?
In factories, the Factories Act sets overtime at twice the ordinary rate. Shops and offices follow their state’s Shops and Establishments Act, and companies often set their own rate for other staff. Check with your accountant.
Are weekly offs and holidays paid?
With the calendar-day and fixed 30-day methods, weekly offs and holidays are normally counted as paid days. With the working-day method, they are already left out of the count.