1. Home
  2. HRM
  3. Salary
  4. How salary amount is calculated.

How salary amount is calculated.

🔍 What the System Checks Before Calculating Salary

Before salary is generated, the system runs a set of pre-flight checks. If any of these fail, the salary will not be created (or you will see a confirmation popup before the system proceeds with a zero / opening-balance month).

  • ✅ The employee must have at least one valid Salary record with an Effective Month / Year on or before the salary month being generated.
  • ✅ The employee must be marked as an Employee in the system (User → Is Employee = Yes).
  • ✅ The user must have been active during the selected month (joined on or before the month-end and not resigned before the month-start).
  • ✅ All Leave requests for the salary month must be finalized (Approved or Rejected) — pending leaves block salary generation.
  • ✅ The Salary Calculation Type must be set in Settings → Salary Settings — either Working Days or Month Days (calendar).
  • ✅ If Leave Encashment is enabled in Leave Settings, the system checks the encashable balance for the employee.
  • ✅ Any applicable Allowances or one-off bonuses for that month must be added beforehand — once salary is generated for the month, you can no longer add or edit allowances for that month.
  • ✅ If TDS is enabled for the employee, the Annual TDS figure must already be entered so the system can split it month-wise across the financial year.
  • Leave Start Month / Year must be configured before the very first salary generation (this anchors the leave-balance ledger).

⚠️ Regeneration is blocked once salary is paid. If the salary for a month has already been marked as paid, the system will not regenerate or overwrite it — you will need to reverse the payment first.

📆 Paid Days Calculation

“Paid Days” is the number of days the employee will actually be paid for in the salary month. It is the foundation for almost every line on the salary slip.

  • The total days basis is decided by the Salary Calculation Type in Salary Settings:
    • Month Days (default) — full calendar days of the month (28 / 29 / 30 / 31).
    • Working Days — calendar days minus weekly offs and holidays defined in your Holiday Settings.
  • If the employee joins or resigns mid-month, paid days are computed on a pro-rata basis from joining date / up to resign date.
  • Unpaid leaves (LWP) approved for that month are deducted from paid days.
  • When the calculation type is Working Days, paid days will never be negative — the system clamps the result at 0 even if recorded leaves exceed working days.

📌 Sandwich Rule — the Sandwich policy (treating a weekend / holiday between two leave days as leave) only takes effect when Salary Calculation Type = Month Days. Under Working Days, weekly offs and holidays are already excluded from the divisor, so the Sandwich rule has no further effect. The system shows a warning popup if you enable Sandwich while Working Days is selected.

📊 Salary Components — What Goes Into the Calculation

Each earning line on the salary slip is computed from the inputs on the employee’s active Salary Data record (latest record whose Effective Month / Year is on or before the salary month). All paid-day-sensitive earnings scale with the Paid Days ÷ Total Days ratio.

ComponentInputs Used
BasicConfigured as a percentage of Monthly CTC; pro-rated by Paid Days ÷ Total Days.
HRAConfigured as a percentage of Monthly Basic; pro-rated by Paid Days ÷ Total Days.
Conveyance AllowanceFixed monthly amount, pro-rated by Paid Days ÷ Total Days. (Earlier behaviour of paying full-month flat has been replaced — Conveyance is now paid-day-based, just like other allowances.)
Travel AllowanceFixed amount from Salary Data, pro-rated by paid days.
CommissionFixed amount from Salary Data, pro-rated by paid days.
Ex-GraciaFixed amount from Salary Data, pro-rated by paid days.
Other AllowanceFixed amount from Salary Data, pro-rated by paid days.
Variable PayConfigured as a percentage of Monthly CTC; pro-rated by paid days. Paid only in the months where the variable component is marked.
Allowances / BonusesAny one-off allowance or bonus added for the month (via the Allowance module) is added directly to the slip.
Leave EncashmentCalculated from the encashable leave balance using the per-day Basic. Encashment uses a 30-day divisor (changed from the older 26-day divisor).

💡 You only need to know what goes in — the system handles the actual arithmetic. If something on the slip looks off, check the employee’s Salary Data, the Allowance entries for that month, the Leave records for that month, and the Salary Calculation Type in Settings — that covers 99% of mismatches.

📉 Deductions

DeductionHow the Inputs Are Used
TDSThe employee’s Annual TDS figure (with prior-employer adjustments if any) is split across the remaining months of the financial year. Each employee can have multiple TDS records per FY, and the system automatically picks the active one. See How TDS is Calculated.
Professional TaxSlab-based. Slabs are configured under Settings → Salary Settings → Professional Tax Settings (Salary From / Salary Up To / Applicable Tax). The slab matching the employee’s gross is applied. If no slabs are configured, the system falls back to the default flat amount.
PF (Employee + Employer)Applies only when Basic ≤ ₹15,000 as per EPF rules. Rates are read from the employee’s Salary Data. The age-based skip filter that earlier excluded older employees has been removed — PF is no longer skipped on the basis of age alone.
ESIC (Employee + Employer)Applies only when Gross Salary ≤ ₹21,000 per ESI Act 1948. Rates are read from the employee’s Salary Data.
Unpaid Leaves (LWP)Already reflected in Paid Days — no separate line. Any over-used / unapproved leave reduces paid days at the full per-day rate.

For PF / ESIC inputs (rates, UAN, ESI number), see Add Salary Data. PF, ESIC, and Professional Tax themselves are no longer stored as expenses — they are tracked as Payroll Credit rows (one per month per employee, no carry-forward). See Liability for how those rows are settled.

🧾 Final Salary Number

Once the inputs above are gathered, the system produces three headline numbers on the slip:

  • Gross Salary — total of all earnings (Basic + HRA + Conveyance + Travel + Commission + Ex-Gracia + Other Allowances + Variable Pay + one-off bonuses + Leave Encashment).
  • Total Deductions — total of all deductions (TDS + Professional Tax + Employee PF + Employee ESIC).
  • Net Salary — the take-home figure: Gross Salary − Total Deductions.

📝 The detailed line-by-line arithmetic happens server-side and is preserved as a frozen breakup on the salary record — reports never re-compute it at runtime, so historic months stay accurate even if you later edit the employee’s Salary Data or change Salary Settings.

📌 Special Scenarios the System Handles

  • 🔄 Multiple Salary records — the latest record whose Effective Month / Year is on or before the salary month is used.
  • 🕓 Mid-month join or resign — salary is pro-rated for the days actually worked.
  • 📉 Cross-month leave — leave that spans two salary months is now correctly split across both months (earlier this could produce negative or doubled-up days; the bug is fixed).
  • 🚫 Negative paid days are prevented when calculation method is Working Days — the system clamps paid days at 0 instead of generating negative figures.
  • 🎯 Variable Pay / Bonus marked for the month — added to that month’s Gross.
  • 📅 Sandwich Rule applies only when Salary Calculation Type = Month Days; under Working Days it has no effect.
  • 👥 Notice-period and Probation-period leaves are flagged with warnings during salary generation so you can decide how to treat them.
  • 💰 Salary opening balance / no salary generated yet — you will see a confirmation popup before the system proceeds, to prevent accidental zero-month generation.

💾 What Is Saved With the Salary

  • Full salary breakup (every component and deduction line, frozen).
  • Salary Month / Year and the Salary Basis used (Working Days or Month Days) at the time of generation.
  • Company Details block (name, address, GSTIN, logo, etc.) is captured on the slip so historic slips reprint correctly even if your company profile changes later.
  • Salary Changelog — if you regenerate, the system stores an old-vs-new diff. Changelogs are written at save / submit time, not on every keystroke.
  • TDS Challan entry is created or updated for the salary month (if TDS applies).
  • Payroll Credit rows are written for PF / ESIC / Professional Tax (one per employee per month, independent — no carry-forward of unpaid amounts).
  • Liability flags that drive the Liability tab:
    • Salary → uses Salary Paid status + Net Salary > 0 + a 3-field guard.
    • Expense (salary-linked) → uses Is Expense Paid.
    • PF / ESIC / Professional Tax → map to Payroll Credit rows whose status is Unpaid / Partial / Paid.
    • TDS → surfaces from Unpaid + Part-Pay flags on the TDS Challan.
  • After calculation, any one-off allowances applied for that month are automatically marked Paid.

Tips

  • Per-day salary defaults to Month Days (calendar). Switch to Working Days in Settings → Salary Settings if you want only the actual working days of the month to count toward earnings.
  • The system also calculates Travel, Commission, Ex-Gracia, and Other Allowance beyond Basic, HRA, Conveyance, and Variable Pay — make sure these are filled correctly in the employee’s Salary Data.
  • PF and ESIC are rule-gated — PF only when Basic ≤ ₹15,000, ESIC only when Gross ≤ ₹21,000.
  • Over-used leave is deducted at the full per-day rate — review pending leaves before generating salary.
  • Allowances cannot be added or edited for a month once salary is generated — add them before generation.
  • Leave Encashment uses a 30-day divisor (the older 26-day divisor has been retired).
  • Configure Professional Tax slabs in Salary Settings; the matching slab is applied automatically.
  • Salary regeneration is blocked once payment is recorded — reverse the payment if you genuinely need to redo the month.

Articles

How can we help?