Methodology · last reviewed 2026-11-15

How every number on the report is computed

Formulas B1–B8 as implemented in the allocator, with the rounding rule, the exchange-rate sources and the boundaries of what the tool does. Everything here is reproducible by hand from the report.

A. Inputs

  1. Receipt lines — one per variant actually received: SKU, name, received quantity, rejected quantity, unit cost in the supplier’s currency, optional weight per unit (g/kg/lb/oz) and packed volume per unit (cm³, or L×W×H in cm or inches). Optional: a PO tag (consolidated shipments), the Shopify cost per item and units on hand (moving average).
  2. Payments — supplier currency, store currency, receipt date and its rate; optionally a deposit amount, its payment date and that day’s rate.
  3. Cost lines — category, label, amount, currency and allocation method: value, quantity, weight, volume or none. Categories: International freight, Duty (from customs entry), MPF / processing fee, Brokerage / clearance, Insurance, Agent commission, Domestic freight (China), Sample / QC inspection, Other, Discount (negative), Import tax (recoverable).

B. Formulas

B1 · Line value

line_value_i = received_i × unit_cost_i × fx_eff, rounded to the cent. Only lines with received_i > 0 exist in the calculation; rejected units are reported but take nothing.

B2 · Basis

value → line_value_i; quantity → received_i; weight → received_i × g_i; volume → received_i × cm³_i. A cost line with a PO tag uses only that PO’s lines. A cost line without a tag on a multi-PO shipment is split to the POs first (by each PO’s Σ basis), then within each PO.

B3 · Share and rounding

share_i,c = amount_c × basis_i ÷ Σ basis, computed exactly (integer arithmetic on scaled bases), then rounded with the largest remainder method: every share is floored to the cent and the remaining cents go to the shares with the largest fractional parts, ties to the earlier line. Result: Σ_i share_i,c = amount_c for every cost line, always. The Σ BALANCED stamp is this check made visible; it counts cost lines whose shares equal the bill.

B4 · Missing weight or volume

If a cost line’s basis is weight or volume and any received line lacks the figure, the run is blocked and the SKUs are listed, with a one-click switch of that cost line to quantity. No line is ever silently given a zero share.

B5 · Landed unit cost

landed_total_i = line_value_i + Σ_c share_i,c; landed_unit_i = landed_total_i ÷ received_i, kept at four decimals and shown at two.

B6 · Uplift and factor

uplift_i = landed_unit_i ÷ (unit_cost_i × fx_eff) − 1; landed cost factor = Σ landed_total ÷ Σ line_value. The factor is the shipment-level multiplier (1.1838 = 18.38% on top of goods).

B7 · New cost per item

Default: landed_unit_i. With “Blend with stock on hand”: new_avg = (on_hand × old_cost + received × landed_unit) ÷ (on_hand + received), four decimals, written to the CSV at two.

B8 · Late costs

A bill arriving after the receipt is allocated across the receipt’s lines by value or quantity (B3). Each line’s share is split by units: expense_i = share_i × sold_i ÷ received_i is a cost of the period; adjust_i = share_i − expense_i raises the on-hand units’ cost by adjust_i ÷ on_hand_i.

C. Exchange rates

Default rates are European Central Bank euro reference rates, cross-rated and served by Frankfurter (api.frankfurter.dev) for the date you enter; weekends and holidays return the previous business day. You can overwrite any rate with the one on your bank slip; the report records the rate, its date and its source either way.

Deposit and balance. A deposit paid before receipt is a non-monetary prepayment: it stays at the rate of the day it was paid and is never retranslated. The unpaid balance takes the receipt-day rate. The effective rate applied to every line is (deposit × fx_dep + (goods − deposit) × fx_rcpt) ÷ goods. Any difference between the receipt-day rate and the rate at which you later pay the balance is a foreign-exchange gain or loss of the period, not a change in inventory cost.

Bills in the supplier’s currency convert at the receipt-day rate; bills in a third currency take the rate you enter on the line; bills in the store currency are not converted.

D. Duty, MPF and taxes

  • Duty is the amount on your customs entry (CBP Form 7501 line totals in the US) or your broker’s invoice. The allocator does not classify HS codes or estimate rates.
  • MPF prefill = 0.3464% of goods value (19 CFR 24.23 ad valorem rate). CBP adjusts the minimum and maximum each fiscal year; use the amount printed on the entry.
  • Recoverable import VAT/GST is recorded as “Import tax (recoverable)” and excluded from landed cost, consistent with IAS 2’s treatment of recoverable taxes.

E. Exports

  • Shopify product CSV: Title, URL handle, Option1–3 name/value (Linked To only when present in your export), SKU, Cost per item. Every variant of a touched product is written; only Cost per item changes; UTF-8 without BOM; two decimals. Rules and template.
  • XLSX: one sheet per SKU with each cost category, one of cost lines with the Σ check, one with the receipt header and FX.
  • PDF: the report printed from the browser (A4 landscape).

F. Boundaries

The allocator computes costs from numbers you enter. It does not file customs entries, classify goods, give accounting or tax advice, or read your Shopify store. Your choice of allocation method and costing method is yours; the report records which you chose so an accountant can follow it.

G. Validation

The engine ships with 33 acceptance tests ported from a hand-checked set of competitor and documentation examples (Landara calculator runs A–D, Qoblex QB2–QB4 and FIFO/MAC/WAC, ThinkLauncher TL1–TL4, Bookkeep, Settle, Stockful, Shelfward, the Landara deposit example 14,929 AUD). Where a competitor rounds each cell independently, our result differs by the cent that makes the column close — those cases are asserted explicitly.

See every formula applied to your own receipt.Allocate my shipment