Calculators · Gutenberg
Salary Calculator block for WordPress
Calculate take-home pay after federal/state taxes, Social Security, Medicare and retirement contributions.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Calculate take-home pay after federal/state taxes, Social Security, Medicare and retirement contributions.
Inspector panels on this block: Content, Sizing. Those titles come from index.js, not from a shared template.
Behavior controls: “Default Pay Period” options: Annual Salary, Monthly Salary, Hourly Wage; “Default Filing Status” options: Single, Married Filing Jointly, Head of Household.
Where to find it
Gutenberg inserter → Calculators → search “Salary Calculator” (block name `blockenberg/salary-calculator` in block.json). Style it in the sidebar after insert.
How to use Salary Calculator block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Salary Calculator”, insert it. Category: Calculators.
- Configure inspector controls that exist on this block. Open Content. Set “Content — Title”, “Subtitle”, “Currency Symbol”, “Default Pay Period”.
- Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Content — Title | Text field in the inspector. block.json default: Salary & Take-Home Pay Calculator. Saved as `title`. |
| Subtitle | Text field in the inspector. block.json default: Estimate your net pay after taxes and deductions. Saved as `subtitle`. |
| Currency Symbol | Text field in the inspector. |
| Default Pay Period | Select control; the chosen value is saved on the block. Options: Annual Salary; Monthly Salary; Hourly Wage. block.json default: annual. Saved as `defaultPeriod`. |
| Default Filing Status | Select control; the chosen value is saved on the block. Options: Single; Married Filing Jointly; Head of Household. block.json default: single. Saved as `defaultFiling`. |
| Default Annual Income | Numeric range control in the inspector. Range 10000–1000000. block.json default: 75000. Saved as `defaultIncome`. |
| State Tax Rate (%) | Numeric range control in the inspector. Range 0–15. block.json default: 5.0. Saved as `defaultStateTax`. |
| 401(k) Contribution (%) | Numeric range control in the inspector. Range 0–30. block.json default: 6.0. Saved as `default401k`. |
| Other Pre-tax Deductions ($) | Numeric range control in the inspector. Range 0–20000. block.json default: 0. Saved as `defaultOtherDed`. |
| Show Tax Breakdown | On/off toggle in the inspector. On by default. Saved as `showBreakdown`. |
| Show All Pay Periods | On/off toggle in the inspector. On by default. Saved as `showAllPeriods`. |
| Show Effective Tax Rate | On/off toggle in the inspector. On by default. Saved as `showEffectiveRate`. |
| Accent / Net Pay | Color control in the inspector. block.json default: #0ea5e9. Saved as `accentColor`. |
| Tax Bars | Color control in the inspector. block.json default: #ef4444. Saved as `taxColor`. |
| Deduction Bars | Color control in the inspector. block.json default: #f59e0b. Saved as `dedColor`. |
| Section Background | Color control in the inspector. block.json default: #f0f9ff. Saved as `sectionBg`. |
| Card Background | Color control in the inspector. block.json default: #ffffff. Saved as `cardBg`. |
| Input Background | Color control in the inspector. block.json default: #f9fafb. Saved as `inputBg`. |
| Result Background | Color control in the inspector. block.json default: #e0f2fe. Saved as `resultBg`. |
| Colors — Title | Color control in the inspector. block.json default: #0c4a6e. Saved as `titleColor`. |
| Subtitle | Color control in the inspector. block.json default: #6b7280. Saved as `subtitleColor`. |
| Labels | Color control in the inspector. block.json default: #374151. Saved as `labelColor`. |
| Max Width (px) | Numeric range control in the inspector. Range 360–1400. block.json default: 720. Saved as `contentMaxWidth`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
- JavaScript functions that perform the math: calcFedTax, calcAll.
When this is the right block
- Calculate take-home pay after federal/state taxes, Social Security, Medicare and retirement contributions — that is the job of Salary Calculator, not a generic content block.
- Use it when you need the editor control labeled “Content — Title”, which exists on this block’s inspector.
- It matches pages about salary, paycheck, take-home.
- The math runs in the visitor’s browser after publish — no extra calculator plugin.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Salary Calculator block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Salary Calculator”. It sits under Calculators. After insert, open Content and set “Content — Title”, “Subtitle”, “Currency Symbol”, “Default Pay Period”.
Does Salary Calculator need a server or extra plugin?
No. After Blockenberg is active, the view script runs in the browser with the values you saved on the block.
Is the Salary Calculator Gutenberg block free?
Yes. Salary Calculator ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Salary Calculator to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Sizing).
Related calculators blocks
Invoice Calculator
A line-item invoice builder with editable rows, discount, tax, and grand total.
Loan Affordability Calculator
Calculate how much home or loan you can afford based on annual income, existing debts, interest rate, and debt-to-income ratios. Ideal for real estate and finance sites.
Tax Calculator
Calculate sales tax, VAT, or estimate income tax brackets. Supports before-tax and after-tax price calculations with customizable tax rates and display options.
Age Calculator
An interactive age calculator that computes exact age in years, months, and days from a birth date. Includes next birthday countdown, total days lived, zodiac sign, and day of week born.
Aspect Ratio Calculator
Calculate image or video dimensions, aspect ratios, and common presets for designers.
BMI Calculator
Interactive Body Mass Index calculator with metric and imperial units, animated result gauge, weight category indicator, and fully customizable styling.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Salary Calculator from the Gutenberg inserter.