# A quantity calculator in a Blogger post or sidebar

> Put a free quantity calculator in a Blogger post or sidebar: the HTML/JavaScript gadget or the post's HTML view, the exact clicks, the code and fixes.

Page: https://craftquantities.com/embeds/blogger/ (embed guide). This is the page's Markdown copy; the HTML page is the canonical version.

Blogger takes HTML in two places: inside a single post, from the editor's HTML view, and on every page at once, from an **HTML/JavaScript** gadget in the layout. Both write the code into the page, so the frame fits its own height.

- Gadget or post Where
- Runs Fitting script
- Automatic Height
- Free Blogger plan

**On this page Before you start**

## Before you start

- Admin or author access to the blog in Blogger.
- For a sidebar: the mini format fits a 250–350 px column; make it in the [full builder](https://craftquantities.com/embeds/#builder).
- For a post: the editor switched to its HTML view while you paste.

## Step by step

1. In a post: open the HTML view

   Open the post in the editor and switch from compose to **HTML view** with the toggle at the top left.
2. Paste where it belongs

   Find the paragraph the calculator should follow and paste the code on a new line after its closing `</p>`. Then **Update** or **Publish**.
3. Or in the sidebar: add a gadget

   In the blog's menu open **Layout**, click **Add a Gadget** in the sidebar area, and choose **HTML/JavaScript**.
4. Paste into Content

   Give the gadget a title if you want one, paste the code into **Content**, and click **Save**.
5. Check the blog

   Open the post or the home page in a private window and try a measurement.

## Your code

_Post HTML view or HTML/JavaScript gadget_

```
<iframe src="https://craftquantities.com/embed/?calc=mulch-calculator&ev=1&fmt=compact" width="100%" height="460" loading="lazy" style="border:1px solid #e4e4e7;border-radius:12px;max-width:100%" title="Mulch Calculator — Craft Quantities"></iframe>
<p style="margin:4px 0 0;font:12px/1.4 system-ui,sans-serif">Calculator by <a href="https://craftquantities.com/calculators/landscaping-outdoor/mulch-calculator/">Craft Quantities</a></p>
<script>(function(){if(window.cqEmbedFit)return;window.cqEmbedFit=1;window.addEventListener("message",function(e){var d=e.data;if(!d||d.source!=="craft-quantities"||d.type!=="size"||typeof d.height!=="number"||!isFinite(d.height))return;var f=document.getElementsByTagName("iframe");for(var i=0;i<f.length;i++){if(f[i].contentWindow!==e.source)continue;var a=document.createElement("a");a.href=f[i].src;if(a.protocol+"//"+a.host!==e.origin)return;f[i].style.height=Math.min(6000,Math.max(200,Math.ceil(d.height)))+"px";return}})})();</script>
```

The frame, the credit line and the fitting script. For a sidebar, choose the compact format here or the mini format in the full builder.

Every other option is in the [full builder](https://craftquantities.com/embeds/#calculator=mulch-calculator).

## What visitors see

Your blog · Garden projects · Spring mulching

Calculator by [Craft Quantities](https://craftquantities.com/calculators/landscaping-outdoor/mulch-calculator/)

## In a post or in the sidebar?

In a post, the calculator answers that post's question ("how much mulch for this bed?") and appears only there. Choose the calculator that matches the article.

In the sidebar, one gadget puts the calculator on every page of the blog. That suits a blog that keeps returning to one job, a gardening blog and mulch, a renovation diary and paint; the mini format is made for that width.

## Troubleshooting

**Blogger will not save the post**

The HTML view found an error in the post's code. Check that nothing was pasted inside another tag, or dismiss the warning if the code is exactly as copied.

**The code changed after switching back to compose**

Paste and publish from the HTML view; switching views can rewrite pasted markup.

**The sidebar frame is too wide**

Use the mini format, which is built for a 250–350 px column, from the full builder.

**The frame does not grow**

The fitting script line was left out. Paste the whole code, or set a larger `height` on the iframe.

## Why it helps

- A DIY or garden blog's how-to post ends with a working answer to the reader's own job, not just the writer's.
- Readers spend longer on the post, and the credit line sends the ones who want the method to a page that cites its sources.
- No ads, no cookies and no tracking come with the frame, so it does not compete with your own ads or analytics.

## Sources

Checked against these help pages on 26 November 2026.

1. [Blogger Help: Add or remove gadgets (HTML/JavaScript)](https://support.google.com/blogger/answer/176245)
2. [Blogger Help: Edit HTML in a post](https://support.google.com/blogger/answer/6286127)

On this page

At a glance

**Where**

Gadget or post

**Fitting script**

Runs

**Height**

Automatic

**Blogger plan**

Free

Official links

- [The plugin on WordPress.org](https://wordpress.org/plugins/craft-quantities-calculators/)
- [Developer hub](https://craftquantities.com/developers/)
- [Static JSON API](https://craftquantities.com/api/)
- [Remote MCP server](https://craftquantities.com/developers/mcp/)
- [npm package](https://craftquantities.com/developers/npm/)

The one rule

Keep the visible credit line under the frame: it is the one condition of the free embed.

**Open:** the engine’s answers (its JSON API, MCP server and npm package), the data files under /api/v1/ and the formula library (/formulas/) are published under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/): reuse them, commercially too, crediting “Craft Quantities” with a link. **Reserved:** the page text, the design and the software, the engine’s code included. [The terms of use](https://craftquantities.com/terms/)

[The terms, in full](https://craftquantities.com/embeds/#terms)

[Home](https://craftquantities.com/)

Embed & integrations

Pages

- [Overview and builder](https://craftquantities.com/embeds/)
- [WordPress plugin](https://craftquantities.com/embeds/wordpress/)
- [Shopify](https://craftquantities.com/embeds/shopify/)
- [Wix](https://craftquantities.com/embeds/wix/)
- [Squarespace](https://craftquantities.com/embeds/squarespace/)
- [Webflow](https://craftquantities.com/embeds/webflow/)
- [Google Sites](https://craftquantities.com/embeds/google-sites/)
- [Blogger](https://craftquantities.com/embeds/blogger/)
- [Any HTML page](https://craftquantities.com/embeds/html/)

Developers & integrations

- [Overview and live call](https://craftquantities.com/developers/)
- [API reference](https://craftquantities.com/developers/api-reference/)
- [Static JSON API](https://craftquantities.com/api/)
- [Remote MCP server](https://craftquantities.com/developers/mcp/)
- [npm package](https://craftquantities.com/developers/npm/)
- [Command line](https://craftquantities.com/developers/cli/)
- [WebMCP in the browser](https://craftquantities.com/developers/webmcp/)
- [Claude and ChatGPT](https://craftquantities.com/ai/)
- [Embeds and WordPress](https://craftquantities.com/embeds/)
- [Browser extension](https://craftquantities.com/tools/browser-extension/)
- [Changelog](https://craftquantities.com/developers/changelog/)
- [Service status](https://craftquantities.com/status/)

On this page

- Before you start
- Step by step
- Your code
- What visitors see
- In a post or in the sidebar?
- Troubleshooting
- Why it helps
- Sources

---
Source: https://craftquantities.com/embeds/blogger/
Craft Quantities: free to read, cite and link to; the pages are not licensed for republication. Quantities only: no prices, no design and no certification.
