Skip to content
๐Ÿ’ธMintage Payroll

The calculation engine โ€‹

Every number on the payroll grid comes from one place: the Builder, which rebuilds one employee for one period in a fixed order. Knowing that order explains almost every "why is this number what it is?" question.

The pipeline โ€‹

1. Gross
add up every gross line
โ†’
2. Deductions
NIS โ†’ insurance โ†’ PAYE โ†’ loansโ€ฆ
โ†’
3. Non-taxable
allowances, then net pay
โ†’
4. Employer
employer NIS, employer shares
โ†’
5. Derived
display & report values
Net pay = Gross โˆ’ (NIS + PAYE + insurance + pension + loans + other) + Non-taxable allowances

The whole rebuild runs inside an audit scope, so a recalculation isn't logged as if a user had edited every field.

Hooks โ€‹

Between stages, small hooks compute values the next stage (or the screen) needs: the employee's age (for NIS rates), overtime and lost-time totals, insurable income, PAYE free pay, taxable income, tax-free overtime and the child allowance claim. After deductions come net-after-deduction, loan totals and the PAYE auto-adjust balance. After everything, insurance totals and payment preferences (splitting net pay across destinations).

Execution order โ€‹

Each group stores an ordered list of what to run โ€” its execution order. The default monthly deduction order is:

  1. NIS (whichever version is enabled for the employee)
  2. Life insurance, then health insurance (pre-tax parts)
  3. PAYE
  4. Taxable (post-tax) insurance parts
  5. Pension plan, sports club
  6. Loan 1 โ€“ 10, advance
  7. Custom deductions 1 โ€“ 100

Order matters: PAYE reads the NIS amount just saved, so NIS must come first. A class never runs twice. When an employee is assigned to a payroll, disabled items are removed from their copy of the order.

Gross order: basic salary โ†’ other salary โ†’ taxable allowance โ†’ overtime (amount, 0.5ร—, 1ร—, 1.5ร—, 2ร—, days) โ†’ lost time (amount, hours, days) โ†’ custom salaries 1 โ€“ 100.

Versions: rules that change every budget โ€‹

Tax rules are code, one class per country / year / frequency โ€” for example paye:guyana:2026:monthly or nis:guyana:2026:fortnightly. Each employee's payroll record stores which class it used, so:

  • closed periods never change when a new budget arrives;
  • switching the default version affects new periods only;
  • Apply to period deliberately re-points an existing period, after a confirmation.

Some versions exist only to preserve history (for example one that reproduces an old rounding issue, so historic periods still rebuild identically). Opt-in variants refine specific behaviour, such as splitting monthly thresholds exactly across the fortnights in a month.

Rounding โ€‹

  • GYD amounts are rounded to whole dollars per line.
  • Fortnightly and weekly NIS and PAYE keep their cents, so tiny differences don't pile up over 26 or 52 periods.
  • USD payrolls keep cents.
  • Optional net-pay rounding to the nearest 5, 10, 20, 50 or 100, or rounding up.

Guard rails โ€‹

  • Gross may never be negative.
  • If gross is zero, every deduction is forced to zero.
  • NIS employee and employer sides must use the same year's rules.
  • Loan-managed fields can't be typed over.
  • A whole-period rebuild refuses to run while anyone is net-locked or the period is being closed.

Three ways the engine runs โ€‹

TriggerScopeWhen
An editOne employee, immediatelyEvery cell save or import row
Finalize PayrollEvery employee copied into the new periodStep 4 of 6
Rebuild periodThe whole current period, in the backgroundAfter changing a rule (e.g. PAYE auto-adjust)

A Rebuild preview in Net Guard runs the engine for everyone without saving, so you can see the effect first.

Country support โ€‹

  • Guyana โ€” NIS and PAYE as described in NIS and PAYE.
  • Panama โ€” a semi-monthly USD payroll: Social Security (CSS), Educational Insurance, occupational risk, income tax (ISR) projected over the year, and the three-instalment 13th-month pay. Rates are in the rates table.

Try it โ€‹

The net pay calculator is a faithful teaching model of the Guyana rules. It reproduces Mintage's results for monthly employees exactly.

Built with the Invernisoft KB house.