Some flooring shoppers know their square footage. Others already know how many boxes they want.
This is a look inside the By the box or area calculator on our Shopify demo store. It's built with Appify Custom Product Options.
The shopper types whichever number they have, the other one fills in, and the box count goes to the cart as the quantity. It's also a free template in the app, so you can install it and start from a working calculator.
What it does
Two fields sit side by side: area in square feet, and quantity in boxes. Type in either one and the other updates. A tickbox adds 10% extra for waste and cuts.
In plain words, the price is the price of one box times the number of boxes. On this demo floor, each box covers 29 square feet.
Why a box-or-area calculator is hard to build
- Shoppers start from different numbers. One has measured the room. Another has a box count from their installer. Two fields that fill each other in, using value rules, serve both.
- You sell whole boxes, not square feet. Most options apps stop at an area price: square feet times a rate. A 220 square foot order is charged as 220 square feet, but you ship 8 boxes, which cover 232. The order still reads in square feet, and someone has to work out the boxes. Here the calculator does it before checkout. It divides the area by the square feet in a box, rounds up, and sends the box count to the cart as the quantity. The order says 8 boxes, the price is 8 times your box price, and your stock counts down in boxes.
- Waste has to go on before the rounding. The 10% is added to the area first, then the box count is worked out. Round first and add waste after, and the shopper can pay for a box they didn't need.
- The box size belongs to the product. The 29 square feet isn't typed into the calculator. It's read from a metafield on the Shopify product.
- The order has to survive the cart. The shopper can fix the area from the cart, and a reorder comes back with every choice filled in.
One price, worked out
Here's a 200 square foot floor with the waste box ticked, with prices in dollars.
- Area with waste: 200 square feet plus 10% is 220 square feet.
- Boxes: 220 divided by 29 square feet a box, rounded up, is 8 boxes.
- Price: 8 boxes at 12.95 a box.
The calculator shows 220 square feet, 8 boxes and a total of 103.60. Untick the waste box and the same 200 square feet comes to 7 boxes and 90.65.
It works the other way too. With the waste box unticked, type 10 boxes, and the area fills in as 290 square feet, with a total of 129.50.
The design decisions
Two fields that fill each other in
Each field has one value rule, set to Once. When the area changes, the rule on the boxes field works out the box count. When the box count changes, the rule on the area field sets it to boxes times the square feet in a box.
Once means the filled-in number stays editable. The shopper can always type over it.
The box count is the cart quantity
The boxes field is a Quantity option, the calculator's first and only one, so it drives the quantity that goes to the cart. The starting price is the selected variant's price, set per unit, so one unit is one box.
Your Shopify price stays the price of a box. The shopper sees it multiplied by the boxes they need.
The shopper types what they know. You ship whole boxes. Square feet or boxes go in, and a whole number of boxes comes out, priced from the box price you already have in Shopify.
Waste added before the rounding
A pricing variable called TOTAL_AREA holds the area, plus 10% when the waste box is ticked. The box count formula adds the same 10%, divides by the box size, and rounds up with CEILING, one of the rounding functions in the formula editor.
Tick the waste box after typing the area and the box count updates too.
The box size comes from the product
On this demo, the formulas read the box size from a metafield on the Shopify product.
To change what a box covers, you change the product, not the formulas.
A summary in square feet, not dollars
The price summary lists the area with waste added, formatted as square feet instead of money, then the box count and the total. The shopper sees the extra 10% they're buying before they add to cart.
What arrives with the order
The calculated price goes to checkout on one cart line, with the box count as the quantity. No area becomes a Shopify variant.
Cart properties send the details to the order: the square feet entered, whether waste was added, the area with waste, and the box count.
Customers can tap Edit options in the cart to change the area without starting over. Later, Appify Reorder brings the floor back with every choice filled in, where Shopify's own Buy again drops them.
Make it yours
- Break prices on bigger orders. Add quantity discount tiers on the box count, so a whole-house order pays less per box than a hallway.
- Measure the rooms instead. Swap the area field for a Room map, where shoppers walk each wall, and work out the boxes from its total area. Here's how a room map handles L-shapes and multiple rooms.
- Run every floor on one calculator. Link it to every floor you sell, and each product brings its own box price.
Get this calculator
This calculator is a free template in the app. Go to Calculators, open the Templates tab, and install it to your store. It arrives as a draft with the fields, rules and formulas already in place. Link it to your floors, set the box size on each product, and publish. Here's how calculator templates work.
Want it different? Ask Chat with AI to change it in your own words. For example:
"Make the waste extra 15%, and show the area in square metres instead of square feet."
For the wider picture, read how to sell custom flooring on Shopify, or see how other apps compare in the best Shopify apps for measurement-based pricing.
FAQ
Can shoppers order by the box instead of by square feet?
Yes. Both fields fill each other in. Type a box count and the area updates, or type the area and the box count updates.
Does the 10% for waste go on before rounding up?
Yes. The formula adds 10% to the area, divides by the square feet in a box, then rounds up to whole boxes.
How does the box count reach the cart?
The boxes field is the calculator's Quantity option, so the box count becomes the cart quantity. The price is your box price times that count.
Do I have to build this calculator myself?
No. It's a free template in the app. Install it from the Templates tab, link it to your products, and change anything you like, by hand or with Chat with AI.
Square feet in, whole boxes out.
Whatever you sell, however you price it · The last options app you'll shop for