How the Chile sueldo líquido calculator is verified

Inputs

InputFieldType
Sueldo bruto / mes (CLP)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)
Cotizaciones (~18,6%)contributions$round((grossMonthly < $const.contribCap ? grossMonthly : $const.contribCap) * $const.contribRate, 2)
Base tributabletaxable$round(grossMonthly - contributions, 2)
Impuesto Únicotax($t := taxable; $round((($t > 877500 ? (($t < 1950000 ? $t : 1950000) - 877500) : 0) * 0.04) + (($t > 1950000 ? (($t < 3250000 ? $t : 3250000) - 1950000) : 0) * 0.08) + (($t > 3250000 ? (($t < 4550000 ? $t : 4550000) - 3250000) : 0) * 0.135) + (($t > 4550000 ? (($t < 5850000 ? $t : 5850000) - 4550000) : 0) * 0.23) + (($t > 5850000 ? (($t < 7800000 ? $t : 7800000) - 5850000) : 0) * 0.304) + (($t > 7800000 ? ($t - 7800000) : 0) * 0.35), 2))
Líquido / mesnetMonthly$round(grossMonthly - contributions - tax, 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.

ConstantValue
contribRate0.186
contribCap3600000

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 1,000,000 CLP — below the tax threshold

given grossMonthly1000000
expect contributions186000
expect taxable814000
expect tax0
expect netMonthly814000

Case 2 — S2 2,500,000 CLP

given grossMonthly2500000
expect contributions465000
expect taxable2035000
expect tax49700
expect netMonthly1985300

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 Chile sueldo líquido calculator

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