Skip to content

Main content

US Paycheck Calculator Source Code

Browse the implementation files for US Paycheck Calculator.
tool.ts typescript
import TakeHomePayCalculator from '../TakeHomePayCalculator.svelte';
import { createTakeHomePayPreview } from '../preview';
import { calculateUSTakeHomePay } from './calculate';

export { calculateUSTakeHomePay };

export const Tool: TypeTool = {
	name: 'US Paycheck Calculator',
	slug: 'take-home-pay-calculator/us',
	intro:
		'Estimate US take-home pay after federal payroll withholding and supported location deductions.',
	tool: calculateUSTakeHomePay,
	i: [],
	o: [
		{
			label: 'Take-home pay',
			placeholder: 'Estimated take-home pay',
			render: 'custom',
			renderas: TakeHomePayCalculator,
			type: 'text'
		}
	],
	takeHomePay: {
		advancedFields: [
			{
				key: 'filingStatus',
				label: 'Filing status',
				options: [
					{ text: 'Single', value: 'single' },
					{ text: 'Married filing jointly', value: 'married' },
					{ text: 'Head of household', value: 'head' }
				],
				type: 'select',
				value: 'single'
			},
			{
				key: 'dependentCredit',
				label: 'Annual W-4 credits',
				type: 'number',
				value: '0'
			},
			{
				key: 'preTax',
				label: 'Annual pre-tax deductions',
				type: 'number',
				value: '0'
			}
		],
		assumptions: [
			'2026',
			'San Francisco, California',
			'Single',
			'Standard W-4',
			'No dependents',
			'No pre-tax deductions'
		],
		country: 'United States',
		countryCode: 'us',
		currency: 'USD',
		locale: 'en-US',
		locations: [
			{ text: 'San Francisco, California', value: 'ca-sf' },
			{ text: 'Federal taxes only', value: 'federal' }
		],
		periods: [
			{ text: 'Yearly', value: 'yearly', selected: true },
			{ text: 'Monthly', value: 'monthly' },
			{ text: 'Semimonthly', value: 'semimonthly' },
			{ text: 'Biweekly', value: 'biweekly' },
			{ text: 'Weekly', value: 'weekly' }
		],
		summaryPeriods: [
			{ text: 'Yearly pay', value: 'yearly' },
			{ text: 'Biweekly pay', value: 'biweekly' }
		]
	},
	alternative: [
		{
			title: 'Germany Take-Home Pay Calculator',
			url: '/take-home-pay-calculator/de/brutto-netto-rechner'
		},
		{
			title: 'Switzerland Take-Home Pay Calculator',
			url: '/take-home-pay-calculator/ch/nettolohnrechner'
		}
	],
	cite: [
		{
			title: 'IRS Publication 15-T (2026)',
			url: 'https://www.irs.gov/publications/p15t'
		},
		{
			title:
				'IRS Social Security and Medicare withholding rates',
			url: 'https://www.irs.gov/taxtopics/tc751'
		},
		{
			title: 'California 2026 withholding schedules',
			url: 'https://edd.ca.gov/en/Payroll_Taxes/Rates_and_Withholding'
		}
	]
};

Tool.preview = createTakeHomePayPreview(Tool);

export default Tool;

Description

Browse the implementation files for US Paycheck Calculator.

References

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

Similar or alternative tools