Skip to content

Main content

Switzerland Take-Home Pay Calculator Source Code

Browse the implementation files for Switzerland Take-Home Pay Calculator.
tool.ts typescript
import TakeHomePayCalculator from '../TakeHomePayCalculator.svelte';
import { commonPeriods } from '../config';
import { createTakeHomePayPreview } from '../preview';
import { calculateSwissTakeHomePay } from './calculate';
import { swissCantons } from './cantons';

export { calculateSwissTakeHomePay };

export const Tool: TypeTool = {
	name: 'Switzerland Take-Home Pay Calculator',
	slug: 'take-home-pay-calculator/ch',
	intro:
		'Estimate Swiss take-home pay using a selected canton and reference municipality.',
	tool: calculateSwissTakeHomePay,
	i: [],
	o: [
		{
			label: 'Take-home pay',
			placeholder: 'Estimated take-home pay',
			render: 'custom',
			renderas: TakeHomePayCalculator,
			type: 'text'
		}
	],
	takeHomePay: {
		advancedFields: [
			{
				key: 'maritalStatus',
				label: 'Marital status',
				options: [
					{ text: 'Single', value: 'single' },
					{ text: 'Married', value: 'married' }
				],
				type: 'select',
				value: 'single'
			},
			{
				key: 'children',
				label: 'Children',
				type: 'number',
				value: '0'
			},
			{
				key: 'churchTax',
				label: 'Church tax',
				options: [
					{ text: 'No', value: 'no' },
					{ text: 'Yes', value: 'yes' }
				],
				type: 'select',
				value: 'no'
			}
		],
		assumptions: [
			'2026 reference estimate',
			'Zürich canton',
			'Zürich municipality',
			'Single',
			'No children',
			'No church tax',
			'Employee'
		],
		country: 'Switzerland',
		countryCode: 'ch',
		currency: 'CHF',
		locale: 'de-CH',
		locations: [...swissCantons].sort((a, b) =>
			a.value === 'ZH' ? -1 : b.value === 'ZH' ? 1 : 0
		),
		periods: commonPeriods,
		summaryPeriods: [
			{ text: 'Yearly pay', value: 'yearly' },
			{ text: 'Monthly pay', value: 'monthly' }
		]
	},
	alternative: [
		{
			title: 'Germany Take-Home Pay Calculator',
			url: '/take-home-pay-calculator/de/brutto-netto-rechner'
		},
		{
			title: 'US Paycheck Calculator',
			url: '/take-home-pay-calculator/us/paycheck-calculator'
		}
	],
	cite: [
		{
			title: 'Swiss Federal Tax Administration calculator',
			url: 'https://swisstaxcalculator.estv.admin.ch/'
		},
		{
			title: 'Swiss tax burden overview',
			url: 'https://www.estv.admin.ch/en/tax-burden-in-switzerland'
		},
		{
			title: 'OASI / DI / EO / unemployment contributions',
			url: 'https://www.ahv-iv.ch/de/Merkbl%C3%A4tter/Beitr%C3%A4ge-AHV-IV-EO-ALV'
		}
	]
};

Tool.preview = createTakeHomePayPreview(Tool);

export default Tool;

Description

Browse the implementation files for Switzerland Take-Home Pay Calculator.

References

  1. Tool.io on GitHub
  2. Tool.io TypeScript tools library

Similar or alternative tools