# Parcel weights and checkout shipping rules

The large lightweight box has a planning billable weight of 28 lb even though it weighs 5 lb. Package volume drives this example. These calculations apply the supplied planning divisors; they are not carrier quotes.

## Parcel checks

| Parcel | Actual pounds | Dimensional pounds | Rounded billable pounds |
|---|---:|---:|---:|
| 20 × 16 × 12 in; 5 lb | 5.0000 | 27.6259 | 28 |
| 6 × 6 × 6 in; 160 oz | 10.0000 | 1.5540 | 10 |
| 50 × 40 × 30 cm; 2000 g | 4.4092 | 26.4555 | 27 |

Imperial dimensional pounds = length × width × height ÷ 139. Metric dimensional kilograms = length × width × height ÷ 5000, then convert kilograms to pounds. Billable pounds = ceiling of the larger actual or dimensional weight. The small box weighs 160 oz ÷ 16 = 10 lb, so actual weight controls that example.

## Checkout checks

| Destination | Discounted merchandise | Shipping | Merchandise + shipping | Service |
|---|---:|---:|---:|---|
| contiguous US | $74.99 | $5.95 | $80.94 | USPS Ground Advantage |
| contiguous US | $75.00 | $0.00 | $75.00 | USPS Ground Advantage |
| Canada | $100.00 | $18.00 | $118.00 | UPS Standard |

The free-shipping threshold applies only to contiguous-US discounted merchandise totals of at least $75. Canada remains $18 even when the merchandise subtotal is $100. Sales tax, if applicable, is a separate checkout calculation. Do not apply the US threshold to Canada.

## Use the calculator

Keep shipping-calculator.mjs and shipping-config.json together. Import billableWeight(parcel) for packing estimates and shippingCharge(destination, discountedSubtotal) for checkout rules. Amounts are processed as integer cents to avoid threshold rounding mistakes. Unsupported destinations return unavailable rather than a misleading zero price. Invalid or nonpositive measurements are rejected.

The downloadable package includes the calculator, merchant configuration, machine-readable calculations and seven executable checks. Run `node --test shipping-calculator.test.mjs` to verify all three parcel examples, both US boundary values, Canada eligibility, unsupported destinations and invalid inputs. All seven checks passed during this execution.

## Packing-team action

Measure the packed outer dimensions before comparing cartons. For the 20 × 16 × 12 inch box, reducing empty space could change the weight basis, but the team should request an actual carrier quote before choosing a service. The store tariff is a customer-facing commercial rule and does not represent the carrier charge or prove fulfillment profitability.
