How the Brazil Salário líquido (net salary) calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Salário bruto mensal | grossMonthly | number |
| Dependentes | dependents | 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) |
|---|---|---|
| INSS | inss | ($g := grossMonthly; $b1 := (($g < $const.inssB1 ? $g : $const.inssB1)) * 0.075; $b2 := ($g > $const.inssB1 ? (($g < $const.inssB2 ? $g : $const.inssB2) - $const.inssB1) : 0) * 0.09; $b3 := ($g > $const.inssB2 ? (($g < $const.inssB3 ? $g : $const.inssB3) - $const.inssB2) : 0) * 0.12; $b4 := ($g > $const.inssB3 ? (($g < $const.inssB4 ? $g : $const.inssB4) - $const.inssB3) : 0) * 0.14; $round($b1 + $b2 + $b3 + $b4, 2)) |
| Deduction Legal | deductionLegal | $round(inss + $const.perDependent * dependents, 2) |
| Deduction | deduction | $round(deductionLegal > $const.simplifiedDiscount ? deductionLegal : $const.simplifiedDiscount, 2) |
| Base IRRF | irrfBase | ($b := grossMonthly - deduction; $round($b > 0 ? $b : 0, 2)) |
| IRRF | irrf | ($b := irrfBase; $t := $b <= 2428.80 ? 0 : $b <= 2826.65 ? $b * 0.075 - 182.16 : $b <= 3751.05 ? $b * 0.15 - 394.16 : $b <= 4664.68 ? $b * 0.225 - 675.49 : $b * 0.275 - 908.73; $t := $t > 0 ? $t : 0; $g := grossMonthly; $r := $g <= $const.reductionFullUpTo ? $const.reductionMax : $g <= $const.reductionEndsAt ? $const.reductionA - $const.reductionB * $g : 0; $r := $r > 0 ? $r : 0; $r := $r < $t ? $r : $t; $round($t - $r, 2)) |
| Líquido / mês | netMonthly | $round(grossMonthly - inss - irrf, 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 |
|---|---|
perDependent | 189.59 |
simplifiedDiscount | 607.2 |
inssB1 | 1621 |
inssB2 | 2902.84 |
inssB3 | 4354.27 |
inssB4 | 8475.55 |
reductionMax | 312.89 |
reductionFullUpTo | 5000 |
reductionEndsAt | 7350 |
reductionA | 978.62 |
reductionB | 0.133145 |
Test vectors (4)
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 3,000 BRL, no dependents — simplified discount wins
given grossMonthly | 3000 |
|---|---|
given dependents | 0 |
expect inss | 248.6 |
expect deduction | 607.2 |
expect irrfBase | 2392.8 |
expect irrf | 0 |
expect netMonthly | 2751.4 |
Case 2 — S3 15,000 BRL — INSS ceiling binds
given grossMonthly | 15000 |
|---|---|
given dependents | 0 |
expect inss | 988.09 |
expect irrf | 2944.55 |
Case 3 — S4 4,800 BRL — Lei 15.270/2025 reduction removes the tax entirely
given grossMonthly | 4800 |
|---|---|
given dependents | 0 |
expect irrf | 0 |
Case 4 — S5 6,000 BRL — inside the 5,000-7,350 taper, the reduction is partial
given grossMonthly | 6000 |
|---|---|
given dependents | 0 |
expect irrf | 385.1 |
Sources
- Receita Federal — tributação de 2026 (tabela progressiva e redução) · checked 2026-10-17
- Receita Federal — cálculo da redução do IR a partir de 1º de janeiro de 2026 · checked 2026-10-17
- INSS — tabela de contribuição mensal 2026 (Portaria Interministerial MPS/MF nº 13/2026) · checked 2026-10-17
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 Brazil Salário líquido (net salary) calculator
Built with Valem — a live, verifiable calculator you can fork and embed.