Calculators · Gutenberg

Loan Calculator block for WordPress

Interactive mortgage and loan calculator with sliders for loan amount, interest rate, and term. Displays monthly payment, total interest, and total cost. Optional amortization schedule and doughnut chart.

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.

Get Blockenberg

What it actually does

Interactive mortgage and loan calculator with sliders for loan amount, interest rate, and term. Displays monthly payment, total interest, and total cost. Optional amortization schedule and doughnut chart.

Inspector panels on this block: Loan Amount, Interest Rate, Loan Term, Display. Those titles come from index.js, not from a shared template.

Behavior controls: “Currency symbol” options: $ (Dollar), € (Euro), £ (Pound), ¥ (Yen), A$ (AUD); “Currency position” options: Before ($ 500), After (500 $).

Where to find it

Gutenberg inserter → Calculators → search “Loan Calculator” (block name `blockenberg/loan-calculator` in block.json). Style it in the sidebar after insert.

How to use Loan Calculator block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Loan Calculator”, insert it. Category: Calculators.
  3. Configure inspector controls that exist on this block. Open Loan Amount. Set “Label”, “Default ($)”, “Minimum ($)”, “Maximum ($)”.
  4. Check the published page. The view script reads HTML data attributes: data-opts, data-result, data-slider. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
LabelText field in the inspector. block.json default: Loan Amount. Saved as `loanLabel`.
Default ($)Numeric range control in the inspector. block.json default: 300000. Saved as `loanAmountDefault`.
Minimum ($)Numeric range control in the inspector. Range 1000–500000. block.json default: 10000. Saved as `loanAmountMin`.
Maximum ($)Numeric range control in the inspector. Range 50000–10000000. block.json default: 2000000. Saved as `loanAmountMax`.
Step ($)Numeric range control in the inspector. Range 100–50000. block.json default: 5000. Saved as `loanAmountStep`.
Label (Interest Label)Text field in the inspector. block.json default: Annual Interest Rate. Saved as `interestLabel`.
Default (%)Numeric range control in the inspector. block.json default: 5.5. Saved as `interestDefault`.
Minimum (%)Numeric range control in the inspector. Range 0.1–5. block.json default: 0.5. Saved as `interestMin`.
Maximum (%)Numeric range control in the inspector. Range 5–30. block.json default: 20. Saved as `interestMax`.
Step (%)Numeric range control in the inspector. Range 0.05–1. block.json default: 0.1. Saved as `interestStep`.
Label (Term Label)Text field in the inspector. block.json default: Loan Term (years). Saved as `termLabel`.
Default (years)Numeric range control in the inspector. block.json default: 25. Saved as `termDefault`.
Minimum (years)Numeric range control in the inspector. Range 1–10. block.json default: 1. Saved as `termMin`.
Maximum (years)Numeric range control in the inspector. Range 5–50. block.json default: 30. Saved as `termMax`.
Currency symbolSelect control; the chosen value is saved on the block. Options: $ (Dollar); € (Euro); £ (Pound); ¥ (Yen); A$ (AUD); C$ (CAD). block.json default: $. Saved as `currency`.
Currency positionSelect control; the chosen value is saved on the block. Options: Before ($ 500); After (500 $). block.json default: before. Saved as `currencyPos`.
Max width (px)Numeric range control in the inspector. Range 400–1200. block.json default: 760. Saved as `maxWidth`.
Show donut chartOn/off toggle in the inspector. On by default. Saved as `showChart`.
Show amortization tableOn/off toggle in the inspector. Off by default. Saved as `showAmortization`.
Amortization rowsNumeric range control in the inspector. Range 3–60. block.json default: 12. Saved as `amortizationRows`.
Show CTA buttonOn/off toggle in the inspector. On by default. Saved as `showCta`.
CTA labelText field in the inspector. block.json default: Apply Now. Saved as `ctaLabel`.
CTA URLText field in the inspector. block.json default: #. Saved as `ctaUrl`.
Open in new tabOn/off toggle in the inspector. Off by default. Saved as `ctaNewTab`.
Show disclaimerOn/off toggle in the inspector. On by default. Saved as `showDisclaimer`.
Disclaimer textMultiline text field in the inspector. block.json default: This calculator is for illustrative purposes only. Actual rates may vary.. Saved as `disclaimer`.
Monthly payment size (px)Numeric range control in the inspector. Range 24–80. block.json default: 48. Saved as `monthlySize`.
Card radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 16. Saved as `cardRadius`.
Button radius (px)Numeric range control in the inspector. Range 0–32. block.json default: 8. Saved as `btnRadius`.
Padding top (px)Numeric range control in the inspector. Range 0–200. block.json default: 60. Saved as `paddingTop`.
Padding bottom (px)Numeric range control in the inspector. Range 0–200. block.json default: 60. Saved as `paddingBottom`.
AccentColor control in the inspector. block.json default: #6c3fb5. Saved as `accentColor`.
Principal colorColor control in the inspector. block.json default: #6c3fb5. Saved as `principalColor`.
Interest colorColor control in the inspector. block.json default: #f59e0b. Saved as `interestColor`.
Monthly paymentColor control in the inspector. block.json default: #6c3fb5. Saved as `monthlyColor`.
Label textColor control in the inspector. block.json default: #374151. Saved as `labelColor`.
Card backgroundColor control in the inspector. block.json default: #ffffff. Saved as `cardBg`.
Card borderColor control in the inspector. block.json default: #e5e7eb. Saved as `cardBorder`.
Results backgroundColor control in the inspector. block.json default: #f5f3ff. Saved as `resultBg`.
CTA backgroundColor control in the inspector. block.json default: #6c3fb5. Saved as `ctaBg`.
CTA textColor control in the inspector. block.json default: #ffffff. Saved as `ctaColor`.
Block backgroundColor control in the inspector. Saved as `bgColor`.

What the front-end script actually does

When this is the right block

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 Loan Calculator block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Loan Calculator”. It sits under Calculators. After insert, open Loan Amount and set “Label”, “Default ($)”, “Minimum ($)”, “Maximum ($)”.

Where do Loan Calculator submissions go?

The published page calls this block’s Blockenberg REST route (see front-end notes). The editor canvas does not send mail unless you preview on the front end.

Is the Loan Calculator Gutenberg block free?

Yes. Loan Calculator ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Loan 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: Loan Amount, Interest Rate, Loan Term, Display).

Related calculators blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Loan Calculator from the Gutenberg inserter.

Get Blockenberg