Every "add a calculator to WordPress" tutorial ends the same way: install a plugin. Then you inherit a settings page, a database table, update notifications, and on shared hosting, a noticeable hit to page weight. If you need one mortgage calculator on one landing page, a plugin is a lot of machinery for the job.
There is a lighter path. My site, Practical Web Tools, ships its calculators as self-contained script widgets. You paste two lines of HTML into WordPress, and the calculator renders inline. The entire computation runs in the visitor's browser, and the script has no server to call home to.
The two lines
Open the post or page in the block editor, add a Custom HTML block, and paste:
<div id="pwt-mortgage-widget"></div> <script src="https://practicalwebtools.com/embed/mortgage-widget.js" defer></script> Preview the page. That is the whole install.
The embed catalog has the current list: mortgage, loan with amortization schedule, compound interest, BMI, calorie and macro (TDEE), pregnancy due date, percentage, countdown, and word counter. Each one follows the same two-line pattern (<div id="pwt-mortgage-widget"> style mount points, one script tag), and each has a live preview on the page so you can try the math before you paste anything.
Why script beats iframe here
Most embeddable calculators you find online are iframes pointed at the vendor's server. That works until it doesn't. If the vendor has an outage, changes their pricing tier, or starts rate-limiting, your WordPress page shows an empty box.
A script widget is different in one specific way: once the browser has downloaded it, the vendor's server is out of the loop. The mortgage calculator on my site and the widget version run the same client-side code. There is no API key to rotate, no quota to exceed, and no request on every pageview, which also means no extra runtime cost if a post gets popular.
Where it works in WordPress
Because the widget is plain HTML, it goes anywhere WordPress accepts HTML:
- A Custom HTML block in any post or page
- a Text/HTML widget in a sidebar or footer
- a footer or header script slot in your theme, if you want it site-wide
- page builders that accept raw HTML (Elementor HTML widget, Beaver Builder HTML module, the Squarespace and Wix equivalents)
No shortcode registration, no enqueue hooks, no child theme. If you later want the calculator on a different page, you move two lines of HTML.
The maintenance question
The honest trade-off: a script widget loads JavaScript from a third party, so you should vet what you load, same as any dependency. These scripts are MIT licensed and mirrored on GitHub, so you can self-host the file instead of loading it from my domain. Self-hosting makes you independent of my site entirely: copy the script into your theme directory, point the src at your own path, and the widget keeps working no matter what happens upstream.
That is the decision I would want if I were the one pasting embed code into a client's WordPress site. Plugins for big recurring needs, two lines of HTML for the one-off calculator, and a self-hosting escape hatch in between.
If you try it, the embed page is the starting point. It lists every widget with a copy button and a live preview, no account required.