← Back to HealthCalc
Free · No Sign-Up

Add a BMI Calculator to Your Website in 30 Seconds

Drop a single <script> tag into your page and you’ve got a fully responsive, self-contained BMI calculator — zero dependencies, zero configuration.

1 line of code
0 dependencies
100% free

Why Embed Our Widget?

⚡
Instant Setup
Copy, paste, done. Works with WordPress, Squarespace, Wix, or any HTML page.
📱
Fully Responsive
Looks great on desktop, tablet, and mobile. Adapts to any container width.
🔒
Privacy-First
No data leaves the browser. Zero tracking, zero cookies. 100% client-side.

What Your Visitors See

The embeddable HealthCalc BMI calculator widget, showing kg/lbs and cm/ft-in unit toggles, weight and height fields, and a Calculate BMI button
The actual embeddable widget, rendered at a 460-pixel container width.

The interface is deliberately small: a unit toggle for weight, a unit toggle for height, two input fields, and one button. A visitor can switch between kilograms and pounds or centimetres and feet/inches without reloading the page. The result appears in the same card with a colour-coded gauge and a plain-language category.

Nothing is hidden behind a sign-up form, and there is no second step. That matters for health content, where visitors often arrive from a search engine with a single question and little patience for friction. If you want to give readers more context, link the result to our full BMI calculator or to the guide on what BMI can and cannot tell you.

Who Uses This Widget

The embed is used in three broad situations:

If you need a different calculator — BMR, calories, body fat, or hydration — link to the relevant page on HealthCalc rather than embedding a second script. One calculator per page keeps the page fast and the call to action clear.

Get the Code

Copy the snippet below and paste it anywhere on your page. The widget will automatically find or create a <div id="healthcalc-bmi-widget"> container.

<!-- HealthCalc BMI Widget --> <div id="healthcalc-bmi-widget"></div> <script src="https://healthcalc.online/widget-bmi.js"></script>

That’s it. The calculator renders inline with a clean white card, blue primary color, and a gradient BMI gauge. All styles are encapsulated to avoid conflicts with your site’s CSS.

Features

Customization Tips

The widget auto-detects a container with id="healthcalc-bmi-widget". To control placement, simply place the div where you want the calculator to appear:

<!-- Place it in a sidebar, footer, or any section --> <div id="healthcalc-bmi-widget" style="max-width:380px;margin:0 auto;"></div> <script src="https://healthcalc.online/widget-bmi.js"></script>

The widget inherits your container’s width. You can wrap it in any layout, sidebar, or column.

How It Works

The script is ~4KB and loads instantly. All BMI calculations happen in the user’s browser — no server requests, no latency, no privacy concerns.

Embedding FAQ

Will the widget slow down my website?

The widget script is about 4 KB, has no external dependencies, and makes no network requests after loading. It will not noticeably affect page speed on a normal site.

Does the widget work with WordPress, Squarespace, and Wix?

Yes. Paste the div and script into a Custom HTML block on any of those platforms. Use an HTML or embed block rather than a text block, because visual editors may remove script tags.

Does the widget collect visitor data?

No. Weight and height stay in the visitor’s browser. The widget does not send measurements to a server, set cookies, or use analytics of its own.

Can I change the widget’s width or colors?

The widget fills its container, so you can set a max-width in the surrounding div. Colors and layout are encapsulated in a Shadow DOM, which keeps them isolated from your site’s CSS.

Is BMI accurate for everyone?

BMI is a screening tool, not a diagnosis. It can misclassify athletes, older adults, pregnant people, and children. Encourage visitors to treat the result as one data point and discuss it with a clinician.