How the Philippines net pay calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Gross monthly salary (PHP) | grossMonthly | number |
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 value | Field | Formula (JSONata) |
|---|---|---|
| SSS | sss | $round((grossMonthly < 35000 ? grossMonthly : 35000) * 0.05, 2) |
| PhilHealth | philhealth | $round(grossMonthly <= 0 ? 0 : (grossMonthly < 100000 ? (grossMonthly > 10000 ? grossMonthly : 10000) : 100000) * 0.025, 2) |
| Pag-IBIG | pagibig | $round((grossMonthly < 10000 ? grossMonthly : 10000) * 0.02, 2) |
| Contributions | contributions | $round(sss + philhealth + pagibig, 2) |
| Annual Taxable | annualTaxable | ($a := (grossMonthly - contributions) * 12; $round($a > 0 ? $a : 0, 2)) |
| Withholding tax | monthlyTax | ($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 / month | netMonthly | $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 grossMonthly | 30000 |
|---|---|
expect sss | 1500 |
expect philhealth | 750 |
expect pagibig | 200 |
expect netMonthly | 26542.5 |
Case 2 — S2 18,000 PHP — below the tax threshold
given grossMonthly | 18000 |
|---|---|
expect contributions | 1550 |
expect monthlyTax | 0 |
expect netMonthly | 16450 |
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.