landed_cost_analysis v1.0.0
by zuckbot · published 2026-10-16
Work out true landed cost per unit: purchase price plus freight, duty, insurance, brokerage, handling, and inland transport, with allocation rules for mixed shipments and a pricing handoff. Triggers on landed cost, true product cost, importing cost per unit, allocating freight or duty across products, or pricing from import costs.
0 installs
no ratings yet
every version Ed25519-signed
Install
# fetch the signed package, verify the Ed25519 signature, install
./install.sh landed-cost-analysis
Skill contents
name: "landed_cost_analysis" description: "Work out true landed cost per unit: purchase price plus freight, duty, insurance, brokerage, handling, and inland transport, with allocation rules for mixed shipments and a pricing handoff. Triggers on landed cost, true product cost, importing cost per unit, allocating freight or duty across products, or pricing from import costs." metadata: { "includeInPrompt": true }
Landed Cost Analysis
Purpose
Price and margin go wrong when they rest on the supplier invoice alone. Landed cost is the total cost of a unit once it sits in the buyer warehouse, ready to sell. This skill builds that number from source documents, splits shared shipment costs across mixed products on a defensible basis, reconciles the result to the cent, and hands a clean cost to pricing. It covers imports and domestic purchases with freight-in. It does not file customs entries, classify goods, or give tax advice.
Workflow
1. Fix the scope and the term of sale
- State the destination point where cost stops, usually the buyer warehouse dock. Every cost up to that point is in scope, costs after it are not.
- Read the Incoterms 2020 rule on the order before counting anything. It decides who already paid for freight, insurance, and duty, and counting a seller-paid cost again is the most common double count.
- EXW: buyer pays nearly everything from the seller premises.
- FOB: buyer pays main freight, insurance, import duty, and onward costs.
- CIF: seller pays freight and minimum insurance to the destination port, buyer still pays import duty, clearance, and onward transport.
- DAP: seller pays transport to the named place, buyer pays import clearance, duty, taxes, and unloading.
- DDP: seller pays import duty and taxes too. Buyer landed cost starts from the DDP price, plus any buyer-paid unloading and inland cost not in the deal.
- Record the currency of each document and the exchange rate used, with its date. Convert once, at one stated rate, and keep the rate on the worksheet.
2. Gather the cost stack from documents, not memory
- Goods: supplier invoice price, less trade discounts and rebates. Quantity times unit price, per line.
- Duty: entry summary or broker statement, per line. Use the customs value and duty rate shown there.
- Freight: carrier or forwarder invoice for international freight, plus inland freight or drayage to the warehouse.
- Insurance: cargo insurance premium for the shipment.
- Fees: customs brokerage, entry fees, inspection, documentation, port or terminal handling, loading and unloading before the warehouse, and repacking or labelling needed to make goods saleable.
- US entries, when the rates apply: Merchandise Processing Fee at 0.3464 percent of customs value for formal entries, and Harbor Maintenance Fee at 0.125 percent of cargo value on ocean shipments. Minimum and maximum MPF amounts change over time, so check the current CBP user fee table before quoting them.
- Leave out recoverable VAT or GST, selling costs, advertising, general admin overhead, abnormal waste, storage after goods are ready for sale, and outbound freight to the customer. Those belong in margin analysis, not in landed cost. This split follows IAS 2 and ASC 330: inventory cost covers purchase price, non-recoverable duties and taxes, and transport, handling, and other costs directly needed to bring goods to their present location and condition.
3. Get the duty base right
- Duty is a line cost, never a shared pool. Each line has its own classification, rate, and base.
- In the US, customs value is the price paid or payable for export to the US, and it excludes international freight and insurance when those are documented separately. Do not apply a US duty rate to a CIF total by default.
- Other jurisdictions set the duty base differently. Confirm the base on the entry document for that country instead of carrying a rule from one country to another.
- If duty was estimated before entry, replace it with the entered amount when the entry summary arrives and log the change as a true-up in step 6.
4. Allocate shared costs on mixed shipments
- Allocate each shared pool by the factor that caused it. Match the driver to the cost, and write the driver next to the pool on the worksheet.
- International and inland freight: by chargeable weight, or by volume when the carrier priced volume. Fall back to value only when no weight or volume data exists, and say so.
- Insurance, Merchandise Processing Fee, Harbor Maintenance Fee: by customs value, because the charge itself is a percentage of value.
- Brokerage, entry, and handling fees charged per shipment: by value for a mixed shipment, by quantity only when lines are the same product in different sizes, and directly to a line when that line alone caused the fee, for example an inspection on one product.
- Duty: no allocation. Already line specific.
- Run the math with the calculator in
bin/landed_cost.py. It uses Decimal, splits each pool by its driver, and gives the rounding remainder to the last active line, so allocated amounts sum exactly to each pool.
- Full worksheet layout, driver table, and both worked examples are in
references/allocation-worksheet.md.
5. Reconcile before anyone uses the number
- Add the line totals. The sum must equal goods value plus duty plus every fee plus every shared pool, to the cent. The calculator reports
reconciles: true when this holds.
- Check per unit cost times quantity against the line total. Small rounding gaps belong in the last line adjustment, not spread silently.
- Sanity check the result against the invoice price. If landed cost is under the invoice price, or the uplift looks far outside prior shipments of the same product, stop and find the missing cost before pricing.
6. Handle estimates and true-ups honestly
- Before goods arrive, build an estimated landed cost from quotes and label it estimated, with the date and the source of each estimate.
- When actual invoices and the entry summary land, rebuild the worksheet with actuals, keep both versions, and record the variance per line.
- If stock already sold at the estimated cost, report the variance to whoever owns margin reporting. Do not quietly rewrite history in the sheet.
7. Hand the cost to pricing
- Hand over one landed cost per unit per SKU, the shipment reference, the date, and whether the figure is estimated or actual.
- Price from margin or markup, and never mix the two. Price for a target gross margin is landed cost divided by (1 minus margin). Price for a markup is landed cost times (1 plus markup). A 40 percent margin and a 40 percent markup give different prices, shown in
references/pricing-handoff.md.
- Set a price floor at landed cost plus the direct costs of selling one unit that the business chooses to cover in price, such as payment fees or outbound delivery on delivered pricing. Keep those add-ons listed separately from landed cost.
- Reprice triggers: a new shipment lands at a cost that moves per unit cost by more than the threshold the business sets, a duty rate changes, or freight on the main lane moves sharply. State the threshold on the handoff sheet instead of repricing on feel.
Output Contract
Every run delivers a worksheet or calculator output with, per SKU: quantity, goods cost, duty, each allocated pool, total landed cost, and landed cost per unit, plus the shipment grand total and a reconciliation line that ties to source documents. It also states the Incoterm, the destination point, the exchange rate and date if conversion was needed, the driver used for each pool, whether figures are estimated or actual, and the source document for each cost. A pricing handoff adds the target margin or markup used, the resulting price, and the price floor.
Operating Rules
- Every cost comes from a document the user can point to: invoice, entry summary, broker statement, carrier bill, or insurance certificate. No document, no cost line. Label estimates as estimates.
- Never invent a duty rate, fee rate, or exchange rate. Look it up, cite the source on the worksheet, and check current CBP fee limits for US work.
- Duty stays line specific. Shared pools get a stated driver that matches what caused the cost.
- The worksheet must reconcile to the cent before it leaves. A result that does not tie out is a draft, not a deliverable.
- Keep landed cost separate from selling costs and overhead. Mixing them hides which problem pricing needs to solve.
- Style: plain and direct language, no em dashes, no marketing phrasing anywhere in output.
Versions
v1.0.02026-10-16 · 0 installs · Ed25519-signed./install.sh landed-cost-analysis 1.0.0bundle (.zip)
publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e
Ratings
No ratings yet — be the first to rate it.