4 min read
Indian payroll is a rules problem
HR software in India feels clunky because the rules keep changing underneath it. Software that treats those rules as data holds up better than software that hard-codes them.
Ask anyone who runs payroll for a small Indian company what they think of their HR software and you'll usually hear the same complaints. Too many screens. A compliance module that costs extra. A spreadsheet kept on the side "just to check".
It's easy to blame the interface. We think the interface is mostly a symptom. Indian payroll is a set of rules that differ by state, depend on each employee's choices and change every few years. Software that doesn't model those rules properly ends up pushing the work back onto the person using it.
What a single payslip has to get right
Take one employee in one month. To pay them correctly, the software has to work out at least four statutory deductions, each with its own logic.
- Provident Fund. Employee and employer each contribute 12% of basic wages and dearness allowance. The employer's share is split, with 8.33% going to the pension scheme, but only on wages up to ₹15,000 a month. Many companies contribute on the full wage, and many cap it at ₹15,000. Both are legal, and the software has to support each one.
- ESI. It applies only to employees earning up to ₹21,000 a month, at 0.75% from the employee and 3.25% from the employer. An employee who crosses the ceiling mid-year stays covered until the end of the contribution period, so the software can't just check this month's salary.
- Professional Tax. States levy it, not the centre. Each state sets its own slabs and its own schedule, some states don't levy it at all, and the Constitution caps it at ₹2,500 a year. A company with offices in three states runs three sets of rules.
- TDS on salary. The employer estimates the employee's tax for the year and deducts it monthly. That depends on which tax regime the employee picked, the declarations they've submitted and anything they've earned elsewhere that they've chosen to report.
None of that is unusual. It's an ordinary month for an ordinary company.
Why the software ends up clunky
Most HR tools were built feature by feature. PF became a screen. ESI became another screen. Professional Tax became a table someone updates by hand when a state changes its slabs. Each rule lives in a different place, written in a different way.
That works until a rule changes. Then someone has to find every place the old rule was written down, change it and hope nothing else depended on it. The Code on Wages is a good example. It says allowances above half of an employee's total pay count back into "wages" for statutory purposes. That one definition touches PF, gratuity and every salary structure a company has designed to keep basic pay low. Software built feature by feature has to be changed in a dozen places at once.
The person running payroll feels this as clunkiness. The numbers look slightly off, so they check them in a spreadsheet. A new rule arrives as an "update" with a long list of manual steps. The software becomes something they work around, not something they trust.
Rules as data
The approach we think holds up is to treat statutory rules as data with dates attached, not as code paths.
A Professional Tax rule, for example, is a state, a set of salary slabs, the amount for each slab, the months it applies to and the date it took effect. When a state revises its slabs, the old record stays and a new one starts on the effective date. Payroll for March uses the March rule. A rerun of last year's payroll uses last year's rules, so old payslips still match what was actually paid.
The same shape works for PF ceilings, ESI thresholds and tax slabs. It has a few useful consequences:
- Changes are additions, not edits. Nobody rewrites a working calculation to support a new rule.
- Every number can explain itself. A deduction can point to the exact rule and date that produced it, which is what an auditor or a confused employee actually wants.
- Testing gets concrete. You can take a real month, apply the rules in force on that date and compare the result with what was filed.
It isn't free. Modelling rules this way takes more thought up front than writing if (state === "MH"), and some rules don't fit a table neatly. The ESI coverage period is one of them, because it depends on history, not just on this month. Those cases need real code. But they're the exception, and keeping them few is most of the work.
What we'd tell anyone building HR software for India
Spend less time on the dashboard and more on the rules underneath it. A clean interface on top of a calculation people don't trust doesn't save anyone time, because they'll still check every payslip by hand. Get the rules right, make every number traceable, and the interface gets simpler almost by itself. There's less for it to explain.
It's the problem we're working on with AptlyHR, our HR and payroll product for Indian businesses.
Rates and thresholds in this note are the central rules as we understand them at the time of writing. Check current notifications before relying on them for payroll.
More notes