Embed a calculator
The calculators below can run on your own website in a frame. Copy the code of one into your page, and your visitors get the calculator with its result.
Updated
How to add a calculator
Open a calculator in the list below and copy its code into the HTML of your page, where the calculator should go. The code is an iframe that loads the calculator from this site, then a line with a link to the full calculator page. “Open the widget” shows the calculator as your visitors will see it, and “Dark version” shows it in dark colors.
In the frame, the result updates as visitors type. The code lets the frame use the clipboard, so “Share link” and the copy buttons work there too.
Options
The src address in the code ends with ?theme=light. For a dark page, change it to ?theme=dark; remove it, and the widget follows the light or dark setting of the visitor’s device.
The code makes the frame as wide as your column, up to 720 px, with width="100%" and max-width:720px. Change either value to suit your layout.
The height in the code holds the calculator with a result on a phone screen. When a visitor opens More options, the calculator grows and scrolls inside the frame. To make the frame follow the height of the calculator, add this line once, anywhere in your page:
<script src="https://ruleworth.com/embed.js" async></script>
The script sets the height of each calculator frame on the page to the height of its calculator, and changes nothing else. Paste it as a plain line of HTML, as shown: it does not work when its code is copied into another script. Without it, the frame keeps the height in the code.
If your site sets a Content-Security-Policy that limits frame-src, add the address of this site to it, and to script-src for the height script.
The link under the calculator
The line under the frame links the site name to the full calculator page, where visitors find how the result is calculated, questions and answers, and sources. The link is optional and nothing requires it: you may remove it or mark it rel="nofollow", and the calculator works the same without it.
The widget has its own line under the calculator, “Powered by Ruleworth”, which links to the full calculator page.
What the widget shows
The widget shows the calculator of the page and nothing else of this site: no ads, no menu, no search, no steps of the calculation and no questions and answers. A cost calculator shows the month of its prices, the same prices as on the full page.
“Share link” copies the address of the full calculator page with the visitor’s numbers, not the address of the widget, and a printed estimate names that page too. Every link in the widget opens in a new tab.
The widget counts its page views with the same analytics tag as this site; the privacy policy describes what it collects.
Calculators you can embed
Concrete
Concrete calculator
Full page: concrete calculator
Code
<iframe src="https://ruleworth.com/embed/concrete-calculator/?theme=light" title="Concrete calculator" width="100%" height="1420" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/concrete/">Ruleworth</a></p>Concrete slab calculator
Full page: concrete slab calculator
Code
<iframe src="https://ruleworth.com/embed/concrete-slab-calculator/?theme=light" title="Concrete slab calculator" width="100%" height="1200" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/concrete/slab-calculator/">Ruleworth</a></p>Concrete slab cost calculator
Full page: concrete slab cost calculator
Code
<iframe src="https://ruleworth.com/embed/concrete-slab-cost-calculator/?theme=light" title="Concrete slab cost calculator" width="100%" height="1780" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/concrete/slab-cost-calculator/">Ruleworth</a></p>Concrete bag calculator
Full page: concrete bag calculator
Code
<iframe src="https://ruleworth.com/embed/concrete-bag-calculator/?theme=light" title="Concrete bag calculator" width="100%" height="1600" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/concrete/bag-calculator/">Ruleworth</a></p>Drywall
Drywall calculator
Full page: drywall calculator
Code
<iframe src="https://ruleworth.com/embed/drywall-calculator/?theme=light" title="Drywall calculator" width="100%" height="1460" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/drywall/">Ruleworth</a></p>Insulation
Insulation calculator
Full page: insulation calculator
Code
<iframe src="https://ruleworth.com/embed/insulation-calculator/?theme=light" title="Insulation calculator" width="100%" height="1460" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/insulation/">Ruleworth</a></p>Roofing
Roofing calculator
Full page: roofing calculator
Code
<iframe src="https://ruleworth.com/embed/roofing-calculator/?theme=light" title="Roofing calculator" width="100%" height="1600" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/roofing/">Ruleworth</a></p>Masonry
Brick calculator
Full page: brick calculator
Code
<iframe src="https://ruleworth.com/embed/brick-calculator/?theme=light" title="Brick calculator" width="100%" height="1300" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/masonry/brick-calculator/">Ruleworth</a></p>Measurements
Square footage calculator
Full page: square footage calculator
Code
<iframe src="https://ruleworth.com/embed/square-footage-calculator/?theme=light" title="Square footage calculator" width="100%" height="1160" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/measurements/square-footage-calculator/">Ruleworth</a></p>Cubic yard calculator
Full page: cubic yard calculator
Code
<iframe src="https://ruleworth.com/embed/cubic-yard-calculator/?theme=light" title="Cubic yard calculator" width="100%" height="1140" style="border:0;max-width:720px" loading="lazy" allow="clipboard-write"></iframe>
<p>Calculator by <a href="https://ruleworth.com/measurements/cubic-yard-calculator/">Ruleworth</a></p>