# How do you build a landed-cost calculator for your Shopify store? | LandedCost HQ

Source: https://landedcosthq.com/blog/2026-10-06-build-landed-cost-calculator-shopify/

## The inputs you need and where to get them

Start with classification. Every product needs an HS code per destination market, because duty rates are set at the national tariff line and they differ by country. This is the input most brands get wrong, either by using one classification globally or by letting it go stale. Build a product-to-HS mapping as a real data asset, reviewed annually, because every downstream calculation inherits its errors. A wrong HS code does not just misprice the calculator; it misstates the legal duty obligation.

Then the cost components. Freight comes from your carrier rate cards for the parcel profiles you actually ship: weight bands, dimensions, and service levels per destination zone. Taxes come from each destination's rules: VAT or GST rates, registration thresholds, and whether the marketplace or the seller is liable. Fees include brokerage, disbursements, and any per-shipment charges. De minimis thresholds matter enormously because they create cliffs: a one-dollar difference in declared value can mean the difference between zero duty and full duty. Document every input's source and last-verified date, because a calculator is only as trustworthy as its stalest input.

## The calculation logic

The core formula is simple: landed cost equals product cost plus freight plus duties plus taxes plus fees. Duties apply to the customs value, which is generally the product price plus international freight and insurance, multiplied by the duty rate for the HS code. Taxes then apply according to local rules, sometimes on the duty-inclusive value, which is the compounding detail that spreadsheets get wrong. Build the formula to handle the order of operations per country rather than assuming one global sequence.

The edge cases are where calculators earn trust. Returned goods, split shipments, and multi-item orders with different HS codes each need defined handling. Currency conversion needs a stated source and timestamp, because the rate used at checkout and the rate at settlement will differ. And the calculator needs a confidence model: flag estimates based on stale inputs or unusual product profiles rather than presenting every number with false precision. A calculator that says this is an estimate and here is why is more useful than one that presents a guess as a guarantee.

## Where to show the number

At checkout, the calculator's job is eliminating surprise. Show the duty and tax estimate as a line item before payment, with a clear label that it is an estimate and who bears the final liability. Stores that show accurate landed costs at checkout see fewer abandoned carts and fewer refused deliveries, because the customer decided with full information. The alternative, surprising the customer with a COD duty bill at the door, is the single most damaging experience in cross-border commerce.

In pricing and planning, the calculator's job is revealing truth. Run every product-market combination through it quarterly to see which markets are actually profitable at current duty rates and freight costs. This analysis routinely surprises brands: the market with the most revenue is not always the market with the best margin after landed costs. Use the output to set market-specific pricing, adjust free-shipping thresholds by destination, and decide where to hold inventory. A calculator that only lives at checkout is a customer service tool; one that feeds pricing is a strategy tool.

## Keeping it accurate over time

Duty rates change, thresholds move, and tax rules get rewritten. The US de minimis debate alone has forced repeated recalculations across the industry. Assign ownership: someone whose job includes verifying the calculator's inputs on a schedule, not just when something breaks. Subscribe to the tariff update feeds for your top markets, and build a quarterly review where the inputs get re-verified and the product-to-HS mapping gets refreshed. Stale inputs are silent margin killers because the calculator keeps producing confident-looking numbers.

Reconcile against reality. Compare the calculator's estimates to actual assessed duties and taxes on delivered shipments, and investigate the gaps. Systematic overestimation means you are padding prices and losing conversions; systematic underestimation means you are eating margin or surprising customers. The reconciliation loop is what turns the calculator from a one-time project into a reliable system. Brands that maintain this discipline find that landed-cost accuracy becomes a competitive advantage: they can price confidently into markets where competitors are still guessing.

## Should we build this ourselves or buy a landed-cost app?

Buy the calculation engine, own the inputs. Third-party apps handle the rate tables and tax logic well, but the HS mapping and product data are yours and no app can generate them. The build-versus-buy decision is really about who maintains the product classification data, and that answer is always you.

## How accurate does the estimate need to be?

Accurate enough that the customer is never surprised and the margin math holds. Perfect accuracy is impossible because final assessment happens at the border, but systematic bias in either direction is fixable and worth fixing. Aim for estimates within a few percent, and disclose that they are estimates.

## Do we need this if we only ship domestically?

Not for checkout, but the discipline transfers. Understanding true per-order economics, freight, fees, packaging, is valuable everywhere. And if international expansion is ever on the roadmap, the product data foundation you build now makes the calculator trivial to extend later.
