How the Brazil salário líquido calculator is verified
Inputs
| Input | Field | Type |
|---|---|---|
| Salário bruto mensal (BRL) | 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 <= 2259.20 ? 0 : $b <= 2826.65 ? $b * 0.075 - 169.44 : $b <= 3751.05 ? $b * 0.15 - 381.44 : $b <= 4664.68 ? $b * 0.225 - 662.77 : $b * 0.275 - 896.00; $round($t > 0 ? $t : 0, 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 | 564.8 |
inssB1 | 1518 |
inssB2 | 2793.88 |
inssB3 | 4190.83 |
inssB4 | 8157.41 |
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 3,000 BRL, no dependents — simplified discount wins
given grossMonthly | 3000 |
|---|---|
given dependents | 0 |
expect inss | 253.41 |
expect deduction | 564.8 |
expect irrfBase | 2435.2 |
expect irrf | 13.2 |
expect netMonthly | 2733.39 |
Case 2 — S3 15,000 BRL — INSS ceiling binds
given grossMonthly | 15000 |
|---|---|
given dependents | 0 |
expect inss | 951.63 |
Sources
- Receita Federal — IRRF · checked 2026-08-02
- INSS — tabela de contribuição · 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 Brazil salário líquido calculator
Built with Valem — a live, verifiable calculator you can fork and embed.