The **Calculator** block adds a button to the product page that opens a calculator in a dialog. What it does depends on the product's format:

- **Roll** wallpaper: **Calculate rolls needed** estimates the number of rolls for the shopper's walls.
- **Panel** wallpaper: **Calculate panels needed** estimates the number of panels (or sets) and recommends a panel height.
- **Scenic mural**: **Find your mural size** recommends the smallest size that covers the wall.

The calculator never adds anything to the cart. When the shopper applies the result, it sets the quantity (or selects the size) in the product form, and the shopper then clicks **Add to cart**.

## Turn it on

1. Set up the product's measurements with `walltropic` metafields. See [Set up product metafields](/docs/walltropic/product-metafields).
2. In the theme editor, open **Theme settings** > **Wallpaper calculator** and make sure **Show calculators on product pages** is on.
3. Open your product template, and under **Product information** click **Add block** > **Calculator**. The default and mural templates already include it, just below the variant picker.

The block has no settings of its own. It shows a calculator for roll and panel products and the size finder for murals, and it's hidden when the product's measurements are missing. Its options are in **Theme settings** > **Wallpaper calculator** (see [Wallpaper calculator settings](/docs/walltropic/calculator-settings)).

![Roll calculator dialog with two walls entered in inches, top and bottom trim, the selected product with its roll width, roll length and pattern match, and an estimate of 5 rolls with a Use 5 rolls button](https://cdn.kbkit.dev/kb/zr3mQVqAvbPd/47a4df8ee7c2bedd2ec3d6f084f4cfe026f7e862.webp)

## When the button shows

The button shows only when all of these are true:

- **Show calculators on product pages** is on in **Theme settings** > **Wallpaper calculator**.
- The product's `walltropic.calculator_enabled` metafield isn't set to false.
- The product's `walltropic.product_format` is `roll`, `panel` or `mural`.
- The selected variant (or the product) has the measurements the calculator needs:
  - **Roll:** roll width and roll length, plus a pattern match of free, or straight or half-drop with a pattern repeat.
  - **Panel:** a panel width, or a **Default panel width** in theme settings.
  - **Mural:** at least one variant with both a mural width and a mural height.

When the measurements are missing, the theme editor shows "Calculator hidden: this product or variant is missing the walltropic measurements it needs." Shoppers see nothing.

## What shoppers see

### Rolls

1. Shoppers choose **Units** (Inches, Feet, Centimeters or Meters) and enter the **Width** and **Height** of each wall. **Add another wall** adds more.
2. Under **Trim (optional)**, they can change **Top trim** and **Bottom trim**. The defaults come from your theme settings.
3. The roll details (**Roll width**, **Roll length**, **Pattern match** and **Pattern repeat**) are shown read-only, "From the product's specifications."
4. The **Estimate** lists the per-wall drops, the tallest wall (used for every drop), the cut length per drop, drops per roll, any waste buffer, and **Estimated rolls needed**.
5. **Use [number] rolls** sets the quantity. The status line confirms "Quantity set to … Add to cart when you're ready."

How the estimate is worked out:

- Drops per wall = wall width ÷ roll width, rounded up. Openings such as doors and windows are not deducted.
- Cut length = tallest wall + top and bottom trim, plus one full pattern repeat for straight and half-drop matches.
- Drops per roll = roll length ÷ cut length, rounded down.
- Rolls = total drops (plus any waste buffer, as whole drops) ÷ drops per roll, rounded up.

If one drop is longer than a roll, the calculator explains that the wallpaper can't cover a wall that tall.

### Panels

1. Shoppers enter their walls the same way.
2. The **Estimate** lists panels per wall (from the panel width), the **Recommended panel height** and **Total panels**. When one unit is a set of several panels, it also shows **Sets to order**.
3. The recommended height is the smallest panel-height variant that covers the tallest wall plus your **Height allowance**. The calculator keeps the shopper's other choices (for example material) and tells them if it also changes the selected variant.
4. **Use [number] panels** (or sets) selects that height and sets the quantity.

If no panel height is tall enough, the calculator says so and links to your help page. If the recommended variant doesn't say how many panels one unit contains (`walltropic.panels_per_purchase_unit`), the estimate still shows, but the quantity can't be set for the shopper.

### Scenic murals

1. Shoppers choose **Units** (Inches or Centimeters) and enter **Wall width** and **Wall height**.
2. They can change the **Width allowance** and **Height allowance** (extra image on each side for trimming and uneven walls). The defaults come from your theme settings.
3. **Available sizes and fit** lists every size with **Recommended**, **Fits, but larger than needed** or **Too small**, and how much bigger or smaller it is.
4. **Choose [size]** selects the recommended size. The quantity stays at 1, because each size is one complete image.

If no size covers the wall, the dialog shows "No size fits? Contact us", linking to the **Help link** in theme settings (or your contact page).

## Tips

- Every estimate is labeled as an estimate, with the note: "Supplier instructions and your installer's advice come first."
- Add the **Calculator** block close to the variant picker and buy buttons so shoppers see the result next to the quantity.
- To hide the calculator on one product (for example a non-standard roll), set its `walltropic.calculator_enabled` metafield to false.
- The calculator's files load only on product pages where it's shown.

## Related

- [Set up the calculator](/docs/walltropic/set-up-calculator)
- [Wallpaper calculator settings](/docs/walltropic/calculator-settings)
- [Calculator page](/docs/walltropic/calculator-page)
- [Mural size cards](/docs/walltropic/mural-size-cards)