Flooring is sold by the box, and shoppers think in square feet. The Flooring Example demo on our demo store, built with Appify Custom Product Options, sits between the two. The shopper types the area and ticks a box to add waste if they want it. The calculator says how many boxes to buy, and bigger orders get a bigger discount.
It's a short calculator with a lot of arithmetic behind it, so it's a good one to copy from.
What does it do?
The page shows an Area field in square feet, a switch to give length and width instead, and a checkbox for adding waste. Under them, a large "You Need" line gives the box count, and a Quantity (Boxes) field sits below that.
A box costs 19.99. Order more boxes and the price per box falls, down to 13.99 at 50 boxes or more.
Why is a box calculator hard to build, and how does Appify Custom Product Options handle it?
- The shopper knows square feet, the store sells boxes. The calculator turns one into the other, rounding up to a whole box, so nobody is charged for half of one.
- Waste has to go on before the rounding. A checkbox adds a waste percentage to the area first. The box count comes from the bigger number.
- The sums have to stay readable. Instead of one long formula, each step is a named pricing variable, and later steps build on earlier ones. You can open any step and see what it does.
- Big orders need a bigger discount. Quantity discount tiers take a percentage off at 3, 7, 12, 20 and 50 boxes. There's no code to enter at checkout.
- The shopper should see the working. The price summary lists the area, the waste, the box count and the floor area they're buying, as well as the money.
- The choices must survive the order. The area, the waste choice and the box count travel to the cart and the order. Customers can fix a mistake with Edit options, and a reorder opens with everything filled in. The story is in why Shopify's Buy again button drops custom options.
One price, worked out
Take a 400 square foot floor with 10% waste added. The shopper reads the box count and enters 82 as the quantity. Every number below comes from the calculator's own summary.
- Area with waste: 400 plus 40 is 440 square feet.
- Boxes: each box covers 5.40 square feet, so 440 divided by 5.40 is just over 81, rounded up to 82 boxes.
- Floor area bought: 82 boxes cover 442.80 square feet.
- Price before the discount: 82 boxes at 19.99 is 1,639.18.
- Quantity discount: 82 boxes is past the 50 box tier, so 30% comes off.
- Total: 1,147.43, or 13.99 a box.
The design decisions
Build the sums as a chain of named steps
The calculator holds six pricing variables, from the area the shopper typed, through the area with waste and the boxes required, to the floor area they end up buying. Later steps build on earlier ones, and the box size lives in one named step of its own.
Round up with CEILING
The boxes-required step divides the area with waste by the area one box holds and wraps the answer in CEILING, which rounds up to the next whole number. A floor that needs 81.5 boxes is priced as 82.
Make the waste optional
The percentage field carries a visibility rule tied to the checkbox. Untick the box and the field disappears, and the area passes through untouched.
Tick it and the field appears with 10 filled in. The shopper can change it, anywhere from 0 to 99.
Say the answer in big type
The "You Need" line is a Calculation option. It displays the result of a formula in a sentence you design, here the boxes-required variable in large type with the number in red. It adds nothing to the price. It answers the shopper's real question.
Show the working in the price summary
The price summary can list any variable, with its own label and unit. Here it shows the required area, the extra for waste, the area with waste, what each box covers, boxes required and the total area bought, in square feet.
Rows can be bold or indented, and thin rules split the sum from the money.
Reward volume with percent-off tiers
The quantity discount table has six rows: no discount at 1, then 2.5% off at 3, 5% at 7, 12% at 12, 20% at 20 and 30% at 50. The highest tier the shopper reaches applies. The summary shows the discount, and the price per unit appears with the full price struck through next to the discounted one.
What arrives with the order?
The cart line carries the area, the waste choice and the box count. Your team reads the same choices in the app's Orders tab, line by line. The discount is applied automatically as a line discount, so the shopper never types a code.
Cart editing is on for this calculator. A customer who typed 40 instead of 400 can reopen their choices from the cart and fix it. The guide to editing configured products in the cart has the details.
Make it yours
- Read the box size from the product. This demo has 5.40 square feet typed into a variable. The box or area calculator reads it from the Shopify product instead, so one calculator serves every floor you sell.
- Give each material its own discounts. Quantity discount rules can follow an option, so vinyl and laminate can use different schedules inside one calculator.
- Measure odd rooms. A Room map option handles L-shapes and angled walls. See the flooring calculator with a room map.
- Add a second discount idea. Tiered and volume pricing for custom products covers amount-off and target-price tiers too.
Get this calculator
Describe it to Chat with AI in plain words. A starting prompt:
"I sell flooring in boxes that each cover 5.4 square feet, at 19.99 a box. The customer enters their area in square feet, or length and width in feet. A checkbox adds waste, 10% by default, that they can change. Round the boxes up to a whole number and show 'You Need X Boxes' in big type. Show the working in the price summary. Take 2.5% off at 3 boxes, 5% at 7, 12% at 12, 20% at 20 and 30% at 50."
Check the result in the preview, then try a few floors by hand. The wider flooring story is in how to sell custom flooring on Shopify.
FAQ
How do I sell flooring by the box on Shopify when customers know their square footage?
Store the area one box covers in a pricing variable, divide the customer's area by it, and round up. The calculator can show the box count in a sentence, and the shopper enters it as the quantity.
Can I add waste to a flooring order?
Yes. A checkbox can reveal a percentage field, and a variable adds that percentage to the area before the box count is worked out.
Can I give bigger orders a discount automatically?
Yes. Quantity discount tiers take a percentage off at the quantities you set, and the discount is applied at checkout without a code.
Can customers see how the box count was worked out?
Yes. The price summary can list any variable, so the area, the waste and the boxes appear above the money.
Can customers fix a typo after adding to the cart?
Yes. With cart editing on, Edit options reopens their choices with everything filled in.
Count the boxes. Price the floor.
Whatever you sell, however you price it · The last options app you'll shop for