Rescisão isn't one formula, it's four different entitlement packages depending on why the contract ended. Sem justa causa (dismissed without cause) gets the full set: saldo de salário, aviso prévio indenizado (30 days plus 3 per year of service, capped at 90), 13º salário proporcional, férias vencidas and proporcionais with their 1/3 additional, and a 40% multa on your FGTS balance.
Pedido de demissão (you resign) keeps the proportional entitlements, you still earned that 13º and vacation time, but drops the aviso prévio indenizado and the FGTS multa entirely. Acordo mútuo, the 2017 reform's mutual-agreement option under Article 484-A, splits the difference: half the aviso prévio, a 20% FGTS multa instead of 40%, and the right to withdraw 80% of your FGTS balance (though not seguro-desemprego). Justa causa, dismissal for cause, is the narrowest by far: only saldo de salário and férias vencidas from a fully completed prior period survive, everything proportional and the aviso are forfeited.
One subtlety most quick estimates miss: when aviso prévio indenizado applies, Súmula 371 of the TST says that notice period counts as service time for calculating your 13º and férias proporcionais, even though you're not physically working it. This calculator applies that projection.
On tax: saldo de salário and 13º proporcional are ordinary taxable income, INSS and IRRF apply using the same 2026 tables and Lei 15.270/2025 redutor as our other Brazil calculators. Everything else, aviso prévio, férias vencidas/proporcionais with their 1/3, and the FGTS multa, is treated as indenizatória (compensatory) and exempt from withholding, following Receita Federal's own administrative guidance for this exact category.