How the Philippines net pay calculator is verified

Inputs

InputFieldType
Gross monthly salary (PHP)grossMonthlynumber

The formula

Each derived value below is computed by the Valem engine from the expression shown, in this order. Nothing else runs — there is no hidden code path.

Derived valueFieldFormula (JSONata)
SSSsss$round((grossMonthly < 35000 ? grossMonthly : 35000) * 0.05, 2)
PhilHealthphilhealth$round(grossMonthly <= 0 ? 0 : (grossMonthly < 100000 ? (grossMonthly > 10000 ? grossMonthly : 10000) : 100000) * 0.025, 2)
Pag-IBIGpagibig$round((grossMonthly < 10000 ? grossMonthly : 10000) * 0.02, 2)
Contributionscontributions$round(sss + philhealth + pagibig, 2)
Annual TaxableannualTaxable($a := (grossMonthly - contributions) * 12; $round($a > 0 ? $a : 0, 2))
Withholding taxmonthlyTax($x := annualTaxable; $a := $x <= 250000 ? 0 : $x <= 400000 ? ($x - 250000) * 0.15 : $x <= 800000 ? 22500 + ($x - 400000) * 0.20 : $x <= 2000000 ? 102500 + ($x - 800000) * 0.25 : $x <= 8000000 ? 402500 + ($x - 2000000) * 0.30 : 2202500 + ($x - 8000000) * 0.35; $round($a / 12, 2))
Net / monthnetMonthly$round(grossMonthly - contributions - monthlyTax, 2)

Test vectors (2)

Every case is executed against this model on each build, by the Java engine and independently by a JavaScript one. A mismatch of a single cent fails the build, so the page cannot ship advertising a figure the model no longer produces.

Case 1 — S1 30,000 PHP

given grossMonthly30000
expect sss1500
expect philhealth750
expect pagibig200
expect netMonthly26542.5

Case 2 — S2 18,000 PHP — below the tax threshold

given grossMonthly18000
expect contributions1550
expect monthlyTax0
expect netMonthly16450

Sources

Check it yourself — and reuse it

The whole model as JSON — inputs, outputs, formulas, vectors and sources in one re-runnable document.

This model is published under CC BY 4.0: use it, adapt it, build on it, with attribution. The licence covers the model — the expression of each rule and the arrangement of the catalog. The rates and thresholds are law, and nobody licenses those; the sources above are where they come from.

← Back to the Philippines net pay calculator

Built with Valem — a live, verifiable calculator you can fork and embed.