Skip to content
Inchworth

Inchworth / Blog / How to add a width × height price calculator to Shopify

How to add a width × height price calculator to Shopify

To add a width × height price calculator to Shopify, install a calculator app that adds a theme app block, choose area pricing or a price table, set your size limits and options, place the block on your product template in the theme editor, and place a test order to check that checkout charges the calculated price.

A width × height calculator lets a customer type the size they need and see the price straight away. It is the standard way to sell banners, signs, glass, acrylic, blinds, curtains, wallpaper panels and anything else cut or printed to size. This guide explains what a good calculator has to do, the two ways to price, and how to add one to a Shopify product page step by step.

What a width × height calculator has to do

On the product page, the calculator needs to:

  • ask for the width and height (or width and drop) in units the customer understands;
  • refuse sizes you can't make, or round them up to sizes you can;
  • show the price as the customer types, including any options such as material or finish;
  • add the item to the cart with the size attached, so you know what to make.

Then, at checkout, something has to make sure the customer pays that price. This is the part people forget. Shopify charges the product's own price unless an app or a Shopify Function changes it, so a calculator that only changes the number on the page isn't enough.

Option 1: code it into your theme

A developer can add two number fields to the product form as line item properties (properties[Width] and properties[Height]), and a few lines of JavaScript can multiply them by your rate and show the result. The size then appears on the order.

The price, however, doesn't. Shopify still charges the product's normal price at checkout. Stores that go this way usually fill the gap with a variant per size band, draft orders or a separate "price adjustment" product, each with its own problems. We cover those in custom size pricing without hidden variants or draft orders.

Hand-coded calculators also need updating every time you change prices, and they can break when you update or change your theme.

Option 2: use a calculator app

A calculator app adds the fields and the price display for you, usually as a theme app block that you place in the theme editor, so no theme code is edited. When you compare apps, check these five things:

  1. How the price is charged at checkout. Ask whether the app sets the price at checkout from your saved rule, or relies on the price the browser sends. How to stop customers changing the price in a Shopify price calculator explains why this matters.
  2. Ways to price. At least area pricing and a price table; ideally length and perimeter too.
  3. Size limits and steps. Minimum and maximum width and height, and rounding to your cutting step.
  4. Options. Choices that add a fixed amount, an amount per square metre, a percentage, or replace the rate.
  5. What the order shows. Width, height and options on the order, the email and the packing slip.

Our comparison of Shopify size-pricing apps lays out how several apps handle these points, taken from their own App Store listings.

Area pricing or a price table?

There are two common ways to turn a width and a height into a price.

Area pricing Price table
How it works width × height × price per m² or ft² look up the price in a width × height grid
Best for banners, glass, acrylic, fabric panels, wallpaper blinds, shutters, anything your supplier quotes in bands
Small sizes need a minimum charge to stay profitable priced by the smallest band
Setting it up one rate, plus options one price per cell

Area pricing is simple to explain: "£45 per square metre". Add a minimum charge so tiny pieces are still worth making, and a base fee if every order has a fixed set-up cost.

A price table copies the grid your supplier or price list already uses. A blind 85 cm wide and 140 cm high is priced at the next column and row up, 90 × 150. This keeps your online prices in line with your trade prices, and makes small sizes dearer per square metre, which is usually what it costs you.

Adding a calculator step by step

These steps follow the usual app-based setup. Menus differ between apps, but the decisions are the same.

1. Install the app and choose a starting point

Install the app from the Shopify App Store. Most offer templates for common products; start from the closest one rather than a blank rule, then change the prices.

2. Choose the pricing method and units

Pick area pricing or a price table. Choose the units customers can type in (cm, mm, inches) and the unit your price is set in.

3. Set size limits and steps

Enter the minimum and maximum width and height you can make. Set a step, such as 1 cm, so a width of 120.4 cm becomes 121 cm. Decide whether sizes outside your limits are refused or charged at the nearest size you make.

4. Add options

Add choices that change the price: material, thickness, finish, lining, eyelets, mounting. For each, decide whether it adds a fixed amount, an amount per square metre, or a percentage.

5. Set a minimum charge

If a 20 × 20 cm piece would cost less than it takes to make, set a minimum charge. The calculator shows the higher of the two.

6. Place the block on your product template

Open your theme editor, go to the product template the product uses, and add the calculator's app block. Put it above the Add to cart button and save. On an Online Store 2.0 theme this needs no code.

7. Set the product's own price

Set the product's normal price to your minimum charge. That is what collections, search and Google Shopping show before a size is chosen.

8. Place a test order

Enter an awkward size, such as 123.5 × 87 cm, choose some options, add it to the cart and check out with a test payment. Check that the price at checkout matches the calculator, and that the order, email and packing slip show the size and options.

Common mistakes

  • Labelling. "Height" means different things to different people. For blinds and curtains, say "drop"; for signs, say "height". Add a short "how to measure" note under the fields.
  • No maximum. Without one, someone will order a 9-metre banner you can't print.
  • Rounding down. Always round up to your step, never down.
  • Testing only on desktop. Most shoppers will see the calculator on a phone. Check that the fields, price and button fit without scrolling sideways.

For the full process with one app, from install to first order, read the Inchworth setup guide. If you sell by length rather than area, see how to sell products by the metre on Shopify.

Questions

Can I build a width × height calculator in my Shopify theme without an app?

You can add width and height fields to the product form as line item properties and show a price with JavaScript. The catch is that Shopify still charges the product's own price at checkout, so the calculated price is only a display unless something sets the price at checkout too.

Should I price by area or with a price table?

Price by area when your cost really does grow with the square metre or square foot, as with banners, glass and fabric panels. Use a price table when your supplier quotes in width and drop bands, as with most blinds, or when small sizes need a higher price per square metre.

Does a calculator work with any Shopify theme?

Calculators that use theme app blocks work with Online Store 2.0 themes such as Dawn and most themes sold today. Older vintage themes can't show app blocks, so they need code added to the theme instead.

How do I show the size on the order?

The calculator should save the width, height and options as properties of the cart line. Shopify then shows them in the order, and most order confirmation emails and packing slip templates show line properties as well. Check both with a test order.

Inchworth adds a size price calculator to your Shopify product pages, and checkout charges the same price. 14-day free trial.

Start your free trial