Weight Calculation

Weight Calculation

Overview

Weight calculation lets you define a formula that computes a product's shipping weight based on customer selections. The calculated weight is saved with the order so your shipping provider can use it to quote accurate rates. You configure it in Calculator Editor → Optional Features → Weight calculation.

Steps

  1. In the Weight calculation section, enter a weight formula in the formula editor. This uses the same syntax as pricing formulas — reference options with OPT("KEY"), OPT_TOKEN("KEY"), or INPUT("KEY"), variables with VAR("KEY"), and look up values from tables with TABLE().
  2. Select a weight unit from the dropdown: lb, oz, kg, or g.
  3. The computed weight from your current preview selections is shown below the formula field so you can verify the calculation in real time.

Details

Setting Description
Weight formula A formula expression that computes the weight. Supports the same syntax as pricing formulas.
Unit The weight unit: lb, oz, kg, or g.
Computed weight (preview) A read-only field showing the result of the formula based on current preview selections.
  • If your product weight depends on dimensions and material, create pricing variables for intermediate values (e.g., VOLUME) and reference them in the weight formula.
  • Shipping apps and Shopify's built-in shipping calculator can use the calculated weight to determine rates.

Examples

  • Custom metal sign — Formula: INPUT("WIDTH") * INPUT("HEIGHT") * 0.05, Unit: lb. Each square inch weighs 0.05 lb. A 12×18 sign computes to 10.8 lb.
  • Packaging with inserts — Formula: TABLE("box_weights", OPT_TOKEN("SIZE")) + INPUT("INSERT_COUNT") * 0.1, Unit: kg. Base box weight from a table plus 0.1 kg per insert.