Payroll is the process of working out, for every employee, two numbers: what the company owes them for a period, and what it is legally allowed to keep back before paying them. Everything else — the spreadsheet, the formulas, the automatic recalculation — is machinery for getting those two numbers right, repeatedly, without arithmetic errors.
The intuition
Picture a single employee for one month. She has a fixed basic salary. On top of that she earns allowances — house rent allowance, dearness allowance, a travel allowance. If she worked overtime or was absent for a few days, the actual amount shifts. That running total is her gross salary: the full amount earned before anything is subtracted.
Now the company does not hand her the whole gross. Some money is withheld. A slice goes into her provident fund, a slice into employee state insurance, and a slice toward income tax. These are deductions. What actually reaches her bank account is gross minus deductions — the net pay.
So the whole concept collapses into one line:
Net Pay=Gross Salary−Total Deductions
The subtlety is that gross itself is built up from parts, and each deduction is computed from a specific part of gross, not from the whole thing. Getting those bases right is where most payroll mistakes live.
Building gross salary
Gross salary is the sum of the earnings components. A typical structure:
Gross=Basic+HRA+DA+Other Allowances+Overtime
The basic is the anchor. Allowances are usually defined as percentages of basic — HRA might be 40% of basic, DA might be 12%. This is why a spreadsheet is the natural tool: change the basic, and every allowance that depends on it updates on its own.
Attendance enters here too. If basic is quoted per month but the employee was present only 22 of 26 working days, the earned basic is scaled:
Earned Basic=Monthly Basic×Total Working DaysDays Present
Computing the deductions
Each deduction has its own rule and its own base. Two of the common ones:
Provident Fund (PF). A fixed percentage of basic (often 12%), deducted from the employee, with the employer contributing a matching amount separately. The employee's share reduces take-home pay.
PF=12%×Basic
ESI. A small percentage of gross, but only applicable if gross is below a statutory wage ceiling. Above the ceiling, no ESI is deducted at all.
ESI=0.75%×Gross(only if Gross≤ceiling)
Income tax (TDS). Deducted based on the employee's estimated annual taxable income and the applicable slab rates, then divided across the remaining months. This is the messiest one because it depends on declared investments and the slab the income falls into.
The base matters. PF is computed on basic, ESI on gross, and tax on annual taxable income. A very common error is applying every percentage to gross. That inflates PF and understates nothing else — but it is simply wrong, and it changes the net pay.
Why a spreadsheet, and what "automatic recalculation" buys you …