Dependent WorkerExamples
Examples
Dependent worker scenarios. For self-employed, see independent worker examples.
Basic Calculations
Minimum Wage Worker
Interactive Example
const minimumWageWorker = simulateDependentWorker({ year: 2025, income: 870, // Portuguese minimum wage 2025 location: 'continent' }); console.log('=== Minimum Wage Worker ==='); const jan = minimumWageWorker.monthlyBreakdown[0]; console.log(`Gross Income (Jan): €${jan.grossIncome.baseSalaryAmount.toFixed(2)}`); console.log(`IRS (Jan): €${jan.irsWithholdingTax.totalAmount.toFixed(2)}`); console.log(`Social Security (Jan): €${jan.socialSecurityContribution.totalAmount.toFixed(2)}`); console.log(`Net Salary (Jan): €${jan.netIncome.totalAmount.toFixed(2)}`); console.log(`Annual Net: €${minimumWageWorker.yearly.totalNetIncomeAmount.toFixed(2)}`);
Average Worker
Interactive Example
const averageWorker = simulateDependentWorker({ year: 2025, income: 1200, location: 'continent' }); console.log('=== Average Worker ==='); const jan = averageWorker.monthlyBreakdown[0]; console.log(`Monthly Net (Jan): €${jan.netIncome.totalAmount.toFixed(2)}`); console.log(`Annual Net: €${averageWorker.yearly.totalNetIncomeAmount.toFixed(2)}`); console.log(`Effective IRS Rate: ${(jan.irsWithholdingTax.totalAmount / jan.taxableIncomeForIrsCalculation * 100).toFixed(1)}%`);
Family Situations
Single Parent with 2 Children
Interactive Example
const singleParent = simulateDependentWorker({ year: 2025, income: 1500, married: false, numberOfDependents: 2, location: 'continent' }); console.log('=== Single Parent (2 children) ==='); const jan = singleParent.monthlyBreakdown[0]; console.log(`Monthly Net (Jan): €${jan.netIncome.totalAmount.toFixed(2)}`); // Compare with same income but no dependents const noDependents = simulateDependentWorker({ year: 2025, income: 1500, location: 'continent' }); const janNoDeps = noDependents.monthlyBreakdown[0]; console.log(`Tax Savings from dependents: €${(janNoDeps.irsWithholdingTax.totalAmount - jan.irsWithholdingTax.totalAmount).toFixed(2)}`);
Married Single Income (1 Holder)
Interactive Example
const marriedSingleIncome = simulateDependentWorker({ year: 2025, income: 2000, married: true, numberOfHolders: 1, numberOfDependents: 1, location: 'continent' }); console.log('=== Married Single Income ==='); const jan = marriedSingleIncome.monthlyBreakdown[0]; console.log(`Monthly Net (Jan): €${jan.netIncome.totalAmount.toFixed(2)}`); console.log(`Annual Net: €${marriedSingleIncome.yearly.totalNetIncomeAmount.toFixed(2)}`);
Married Dual Income (2 Holders)
Interactive Example
// Spouse 1 const spouse1 = simulateDependentWorker({ year: 2025, income: 1400, married: true, numberOfHolders: 2, numberOfDependents: 1, // One child shared location: 'continent' }); // Spouse 2 const spouse2 = simulateDependentWorker({ year: 2025, income: 1100, married: true, numberOfHolders: 2, numberOfDependents: 0, // Child already counted in spouse1 location: 'continent' }); const totalHouseholdNet = spouse1.monthlyBreakdown[0].netIncome.totalAmount + spouse2.monthlyBreakdown[0].netIncome.totalAmount; console.log('=== Married Dual Income ==='); console.log(`Spouse 1 Net (Jan): €${spouse1.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Spouse 2 Net (Jan): €${spouse2.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Total Household Net (Jan): €${totalHouseholdNet.toFixed(2)}`);
Regional Comparisons
Same Salary Across Regions
Interactive Example
const income = 1500; const continent = simulateDependentWorker({ year: 2025, income, location: 'continent' }); const azores = simulateDependentWorker({ year: 2025, income, location: 'azores' }); const madeira = simulateDependentWorker({ year: 2025, income, location: 'madeira' }); console.log('=== Regional Comparison (January) ==='); console.log(`Continent Net: €${continent.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Azores Net: €${azores.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Madeira Net: €${madeira.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`);
Disability Benefits
Worker with Disability
Interactive Example
const workerWithDisability = simulateDependentWorker({ year: 2025, income: 1300, disabled: true, location: 'continent' }); const workerWithoutDisability = simulateDependentWorker({ year: 2025, income: 1300, disabled: false, location: 'continent' }); console.log('=== Disability Benefits ==='); console.log(`With Disability - Net (Jan): €${workerWithDisability.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Without Disability - Net (Jan): €${workerWithoutDisability.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Monthly Benefit: €${(workerWithDisability.monthlyBreakdown[0].netIncome.totalAmount - workerWithoutDisability.monthlyBreakdown[0].netIncome.totalAmount).toFixed(2)}`);
Lunch Allowances
With Meal Vouchers
Interactive Example
const withVouchers = simulateDependentWorker({ year: 2025, income: 1400, lunchAllowanceDailyValue: 7.5, lunchAllowanceMode: "cupon", lunchAllowanceDaysCount: 22 }); const withoutVouchers = simulateDependentWorker({ year: 2025, income: 1400 }); console.log('=== Impact of Meal Vouchers (January) ==='); const janWith = withVouchers.monthlyBreakdown[0]; const janWithout = withoutVouchers.monthlyBreakdown[0]; console.log(`With Vouchers - Net: €${janWith.netIncome.totalAmount.toFixed(2)}`); console.log(`Without Vouchers - Net: €${janWithout.netIncome.totalAmount.toFixed(2)}`); console.log(`Benefit: €${(janWith.netIncome.totalAmount - janWithout.netIncome.totalAmount).toFixed(2)}`);
High-Value Cash Allowance
Interactive Example
const cashAllowance = simulateDependentWorker({ year: 2025, income: 2000, lunchAllowanceDailyValue: 10.00, lunchAllowanceMode: "salary", lunchAllowanceDaysCount: 21 }); const jan = cashAllowance.monthlyBreakdown[0]; console.log('=== High Cash Lunch Allowance ==='); console.log(`Total Allowance: €${jan.lunchAllowance.grossAmount.toFixed(2)}`); console.log(`Taxable Portion: €${jan.lunchAllowance.taxableAmount.toFixed(2)}`); console.log(`Tax-Free Portion: €${jan.lunchAllowance.taxExemptAmount.toFixed(2)}`);
Holiday Allowance Distribution
Comparing Distribution Methods
Interactive Example
const noTwelfths = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.NONE }); const oneTwelfth = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.ONE_MONTH }); const twoTwelfths = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.TWO_MONTHS }); console.log('=== Holiday Allowance Distribution Impact (January) ==='); console.log(`No Distribution - Monthly Net: €${noTwelfths.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`One Month - Monthly Net: €${oneTwelfths.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Two Months - Monthly Net: €${twoTwelfths.monthlyBreakdown[0].netIncome.totalAmount.toFixed(2)}`); console.log(`Annual Net (Two Months): €${twoTwelfths.yearly.totalNetIncomeAmount.toFixed(2)}`);
High Earner Examples
Executive Salary
Interactive Example
const executive = simulateDependentWorker({ year: 2025, income: 8000, married: true, numberOfHolders: 1, numberOfDependents: 2, location: 'continent', lunchAllowanceDailyValue: 12, lunchAllowanceMode: 'cupon', lunchAllowanceDaysCount: 22 }); const jan = executive.monthlyBreakdown[0]; console.log('=== Executive Salary (January) ==='); console.log(`Gross: €${jan.grossIncome.baseSalaryAmount.toFixed(2)}`); console.log(`IRS: €${jan.irsWithholdingTax.totalAmount.toFixed(2)}`); console.log(`Net: €${jan.netIncome.totalAmount.toFixed(2)}`); console.log(`Effective Rate: ${(jan.irsWithholdingTax.totalAmount / jan.taxableIncomeForIrsCalculation * 100).toFixed(1)}%`); console.log(`Annual Net: €${executive.yearly.totalNetIncomeAmount.toFixed(2)}`);
IRS Jovem (Youth IRS)
See the IRS Jovem section in the API reference for the legal references and the year-of-benefit table.
Year 1: Full Exemption (100%)
Interactive Example
// Single worker on €1500/month, 1.º ano of IRS Jovem (100% exemption). // Income is below the per-payment cap, so retention drops to zero. const baseline = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.NONE, lunchAllowanceDailyValue: 0, }); const youthIrs = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.NONE, lunchAllowanceDailyValue: 0, benefitsOfYouthIrs: true, yearOfYouthIrs: 1, }); const baseJan = baseline.monthlyBreakdown[0]; const youthJan = youthIrs.monthlyBreakdown[0]; console.log('=== IRS Jovem - 1.º Ano (100% Exemption) ==='); console.log(`IRS without Youth IRS: €${baseJan.irsWithholdingTax.totalAmount.toFixed(2)}`); console.log(`IRS with Youth IRS: €${youthJan.irsWithholdingTax.totalAmount.toFixed(2)}`); console.log(`Exempt income (Jan): €${youthJan.youthIrs.exemptIncome.toFixed(2)}`); console.log(`Monthly net gain: €${(youthJan.netIncome.totalAmount - baseJan.netIncome.totalAmount).toFixed(2)}`);
Year 2-4: Partial Exemption (75%)
Interactive Example
// Same worker, now in their 2.º-4.º year of benefit (75% exemption). // Retention scales linearly with the non-exempt fraction. const youthIrs = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.NONE, lunchAllowanceDailyValue: 0, benefitsOfYouthIrs: true, yearOfYouthIrs: 2, }); const baseline = simulateDependentWorker({ year: 2025, income: 1500, twelfths: Twelfths.NONE, lunchAllowanceDailyValue: 0, }); const baseJan = baseline.monthlyBreakdown[0]; const youthJan = youthIrs.monthlyBreakdown[0]; console.log('=== IRS Jovem - 2.º-4.º Ano (75% Exemption) ==='); console.log(`Exemption %: ${(youthJan.youthIrs.exemptionPercentage * 100).toFixed(0)}%`); console.log(`Exempt income (Jan): €${youthJan.youthIrs.exemptIncome.toFixed(2)}`); console.log(`IRS without: €${baseJan.irsWithholdingTax.totalAmount.toFixed(2)}`); console.log(`IRS with: €${youthJan.irsWithholdingTax.totalAmount.toFixed(2)}`); console.log(`Annual net gain: €${(youthIrs.yearly.totalNetIncomeAmount - baseline.yearly.totalNetIncomeAmount).toFixed(2)}`);
Above the IAS Cap
Interactive Example
// High earner: income exceeds the per-payment cap = (55 × IAS) / 14. // The exempt portion is capped, so the rest of the salary is taxed normally. const highEarner = simulateDependentWorker({ year: 2025, income: 5000, twelfths: Twelfths.NONE, lunchAllowanceDailyValue: 0, benefitsOfYouthIrs: true, yearOfYouthIrs: 1, }); const jan = highEarner.monthlyBreakdown[0]; console.log('=== IRS Jovem - Above the Cap ==='); console.log(`Gross monthly income: €${jan.grossIncome.baseSalaryAmount.toFixed(2)}`); console.log(`Monthly exempt cap: €${jan.youthIrs.monthlyExemptCap.toFixed(2)}`); console.log(`Exempt income (Jan): €${jan.youthIrs.exemptIncome.toFixed(2)}`); console.log(`Non-exempt portion: €${(jan.grossIncome.baseSalaryAmount - jan.youthIrs.exemptIncome).toFixed(2)}`); console.log(`IRS retention (Jan): €${jan.irsWithholdingTax.totalAmount.toFixed(2)}`);
Complex Scenarios
Family with Disabled Dependent
Interactive Example
const familyWithDisabledChild = simulateDependentWorker({ year: 2025, income: 2200, married: true, numberOfHolders: 1, numberOfDependents: 2, numberOfDependentsDisabled: 1, partnerDisabled: false, location: 'continent' }); const jan = familyWithDisabledChild.monthlyBreakdown[0]; console.log('=== Family with Disabled Child ==='); console.log(`Net Salary (Jan): €${jan.netIncome.totalAmount.toFixed(2)}`); console.log(`Tax Benefits Applied: Yes`);
Last updated on