Calculators · Gutenberg
Invoice Calculator block for WordPress
A line-item invoice builder with editable rows, discount, tax, and grand total.
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
A line-item invoice builder with editable rows, discount, tax, and grand total.
Inspector panels on this block: Header, Invoice Settings, Sizing & Layout. Those titles come from index.js, not from a shared template.
Where to find it
Gutenberg inserter → Calculators → search “Invoice Calculator” (block name `blockenberg/invoice-calculator` in block.json). Style it in the sidebar after insert.
How to use Invoice Calculator block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Invoice Calculator”, insert it. Category: Calculators.
- Configure inspector controls that exist on this block. Open Header. Set “Show Title”, “Show Subtitle”, “Header — Title”, “Subtitle”.
- 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 |
|---|---|
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Show Subtitle | On/off toggle in the inspector. On by default. Saved as `showSubtitle`. |
| Header — Title | Text field in the inspector. block.json default: Invoice. Saved as `title`. |
| Subtitle | Text field in the inspector. block.json default: Add items, apply discount and tax to calculate your total.. Saved as `subtitle`. |
| Currency Symbol | Text field in the inspector. block.json default: $. Saved as `currencySymbol`. |
| Default Tax (%) | Text field in the inspector. block.json default: 10. Saved as `defaultTax`. |
| Default Discount (%) | Text field in the inspector. block.json default: 0. Saved as `defaultDiscount`. |
| Show From / To Info | On/off toggle in the inspector. Off by default. Saved as `showFromTo`. |
| From Name | Text field in the inspector. block.json default: Your Business Name. Saved as `fromName`. |
| To Name | Text field in the inspector. block.json default: Client Name. Saved as `toName`. |
| Show Invoice Number | On/off toggle in the inspector. Off by default. Saved as `showInvoiceNo`. |
| Card Border Radius | Numeric range control in the inspector. Range 0–40. block.json default: 16. Saved as `cardRadius`. |
| Input Border Radius | Numeric range control in the inspector. Range 0–20. block.json default: 6. Saved as `inputRadius`. |
| Max Width (px) | Numeric range control in the inspector. Range 320–900. block.json default: 640. Saved as `maxWidth`. |
| Padding Top (px) | Numeric range control in the inspector. Range 0–160. block.json default: 60. Saved as `paddingTop`. |
| Padding Bottom (px) | Numeric range control in the inspector. Range 0–160. block.json default: 60. Saved as `paddingBottom`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
- JavaScript functions that perform the math: makeTotalRow, recalc, updateLineTotal.
When this is the right block
- A line-item invoice builder with editable rows, discount, tax, and grand total — that is the job of Invoice Calculator, not a generic content block.
- Use it when you need the editor control labeled “Show Title”, which exists on this block’s inspector.
- It matches pages about invoice, line items, tax.
- 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 Invoice Calculator block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Invoice Calculator”. It sits under Calculators. After insert, open Header and set “Show Title”, “Show Subtitle”, “Header — Title”, “Subtitle”.
Does Invoice 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 Invoice Calculator Gutenberg block free?
Yes. Invoice Calculator ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Invoice 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: Header, Invoice Settings, Sizing & Layout).
Related calculators blocks
Discount Calculator
Calculate sale prices from discount percentages, find original prices from sale prices, or determine what discount percentage was applied. Three versatile calculation modes.
Price Calculator
Interactive SaaS pricing calculator with sliders, toggle switches, checkbox add-ons, and live price calculation. Supports monthly/annual billing and custom formulas.
Salary Calculator
Calculate take-home pay after federal/state taxes, Social Security, Medicare and retirement contributions.
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.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Invoice Calculator from the Gutenberg inserter.