Calculators · Gutenberg
Mortgage Calculator block for WordPress
Calculate monthly mortgage payments with amortization table, principal vs interest breakdown, LTV ratio, and optional PMI estimate.
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 monthly mortgage payments with amortization table, principal vs interest breakdown, LTV ratio, and optional PMI estimate.
Inspector panels on this block: Content, Defaults, Display, Sizing. Those titles come from index.js, not from a shared template.
Behavior controls: “Currency position” options: Before, After; “Default term” options: 10 years, 15 years, 20 years, 25 years, 30 years.
Where to find it
Gutenberg inserter → Calculators → search “Mortgage Calculator” (block name `blockenberg/mortgage-calculator` in block.json). Style it in the sidebar after insert.
How to use Mortgage Calculator block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Mortgage Calculator”, insert it. Category: Calculators.
- Configure inspector controls that exist on this block. Open Content. Set “Content — Title”, “Show title”, “Subtitle”, “Show 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 |
|---|---|
| Content — Title | Text field in the inspector. block.json default: Mortgage Calculator. Saved as `title`. |
| Show title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Subtitle | Text field in the inspector. block.json default: Estimate your monthly payment and total cost.. Saved as `subtitle`. |
| Show subtitle | On/off toggle in the inspector. On by default. Saved as `showSubtitle`. |
| Currency symbol | Text field in the inspector. block.json default: $. Saved as `currency`. |
| Currency position | Select control; the chosen value is saved on the block. Options: Before; After. block.json default: before. Saved as `currencyPos`. |
| Default home price | Numeric range control in the inspector. Range 50000–5000000. block.json default: 350000. Saved as `defaultPrice`. |
| Default down payment % | Numeric range control in the inspector. Range 0–50. block.json default: 20. Saved as `defaultDown`. |
| Default rate % | Numeric range control in the inspector. Range 0.5–25. block.json default: 6.5. Saved as `defaultRate`. |
| Default term | Select control; the chosen value is saved on the block. Options: 10 years; 15 years; 20 years; 25 years; 30 years. block.json default: 30. Saved as `defaultTerm`. |
| Show PMI | On/off toggle in the inspector. On by default. Saved as `showPMI`. |
| PMI rate % | Numeric range control in the inspector. Range 0.1–2. block.json default: 0.5. Saved as `pmiRate`. |
| Show breakdown | On/off toggle in the inspector. On by default. Saved as `showBreakdown`. |
| Show LTV ratio | On/off toggle in the inspector. On by default. Saved as `showLTV`. |
| Show year table | On/off toggle in the inspector. On by default. Saved as `showYearTable`. |
| Table rows | Numeric range control in the inspector. Range 5–30. block.json default: 10. Saved as `tableRows`. |
| Accent | Color control in the inspector. block.json default: #6c3fb5. Saved as `accentColor`. |
| Card background | Color control in the inspector. block.json default: #ffffff. Saved as `cardBg`. |
| Result background | Color control in the inspector. block.json default: #f5f3ff. Saved as `resultBg`. |
| Result border | Color control in the inspector. block.json default: #ede9fe. Saved as `resultBorder`. |
| Total / main | Color control in the inspector. block.json default: #6c3fb5. Saved as `totalColor`. |
| Principal | Color control in the inspector. block.json default: #3b82f6. Saved as `principalColor`. |
| Interest | Color control in the inspector. block.json default: #ef4444. Saved as `interestColor`. |
| PMI | Color control in the inspector. block.json default: #f59e0b. Saved as `pmiColor`. |
| Colors — Title | Color control in the inspector. block.json default: #1e1b4b. Saved as `titleColor`. |
| Table background | Color control in the inspector. block.json default: #fafafa. Saved as `tableBg`. |
| Max width (px) | Numeric range control in the inspector. Range 340–1200. block.json default: 680. Saved as `maxWidth`. |
| Padding top | Numeric range control in the inspector. Range 0–120. block.json default: 60. Saved as `paddingTop`. |
| Padding bottom | Numeric range control in the inspector. Range 0–120. block.json default: 60. Saved as `paddingBottom`. |
| Card radius (px) | Numeric range control in the inspector. Range 0–32. block.json default: 16. Saved as `cardRadius`. |
| Input radius (px) | Numeric range control in the inspector. Range 0–20. block.json default: 8. Saved as `inputRadius`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts.
- JavaScript functions that perform the math: calcMortgage.
When this is the right block
- Calculate monthly mortgage payments with amortization table, principal vs interest breakdown, LTV ratio, and optional PMI estimate — that is the job of Mortgage 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 mortgage, loan, 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 Mortgage Calculator block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Mortgage Calculator”. It sits under Calculators. After insert, open Content and set “Content — Title”, “Show title”, “Subtitle”, “Show subtitle”.
Where do Mortgage 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 Mortgage Calculator Gutenberg block free?
Yes. Mortgage Calculator ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Mortgage 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, Defaults, Display, Sizing).
Related calculators blocks
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.
Loan Calculator
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.
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.
Body Fat Calculator
Calculate body fat percentage using the US Navy method based on height, neck, waist, and hip measurements. Shows body fat category and health range.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Mortgage Calculator from the Gutenberg inserter.