How the Portugal salário líquido calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Salário bruto anual (EUR) | grossAnnual | 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) |
|---|---|---|
| Segurança Social (11%) | ss | $round(grossAnnual * $const.ssRate, 2) |
| Deduction | deduction | ss > $const.specificDeduction ? ss : $const.specificDeduction |
| Rendimento coletável | taxable | ($b := grossAnnual - deduction; $round($b > 0 ? $b : 0, 2)) |
| IRS | irs | ($t := taxable; $round((($t < 8342 ? $t : 8342) * 0.125) + (($t > 8342 ? (($t < 12587 ? $t : 12587) - 8342) : 0) * 0.157) + (($t > 12587 ? (($t < 17838 ? $t : 17838) - 12587) : 0) * 0.212) + (($t > 17838 ? (($t < 23089 ? $t : 23089) - 17838) : 0) * 0.241) + (($t > 23089 ? (($t < 29397 ? $t : 29397) - 23089) : 0) * 0.311) + (($t > 29397 ? (($t < 43090 ? $t : 43090) - 29397) : 0) * 0.349) + (($t > 43090 ? (($t < 46566 ? $t : 46566) - 43090) : 0) * 0.431) + (($t > 46566 ? (($t < 86634 ? $t : 86634) - 46566) : 0) * 0.446) + (($t > 86634 ? ($t - 86634) : 0) * 0.48), 2)) |
| Líquido / ano | netAnnual | $round(grossAnnual - ss - irs, 2) |
| Líquido / mês (14) | netMonthly | $round(netAnnual / 14, 2) |
Rates and thresholds
The expressions above read these as $const. They are the figures the annual refresh replaces, so they live as data rather than being written into the formulas — which is what makes a year-on-year change a one-line diff instead of an edit to arithmetic.
| Constant | Value |
|---|---|
ssRate | 0.11 |
specificDeduction | 4587.09 |
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 21,000 EUR (1,500 x 14) single
given grossAnnual | 21000 |
|---|---|
expect ss | 2310 |
expect deduction | 4587.09 |
expect taxable | 16412.91 |
expect irs | 2520.31 |
Case 2 — S3 60,000 EUR single
given grossAnnual | 60000 |
|---|---|
expect ss | 6600 |
expect deduction | 6600 |
expect taxable | 53400 |
expect irs | 15374.68 |
Sources
- Portal das Finanças · checked 2026-08-02
- Segurança Social · checked 2026-08-02
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 Portugal salário líquido calculator
Built with Valem — a live, verifiable calculator you can fork and embed.