How to Build a Simple Bag Landed Cost Calculator in Excel
A landed cost calculator is a driver block, a calculation block and three checks. Build it once with the rates in their own cells and the whole model can be re-run for a new market, a new line or a new order size without being rewritten.

Fifteen input cells, eleven calculated lines, three checks. The drivers are the quantity, the FOB unit price, the freight quote, the insurance rate, the duty rate, any origin-based rate, the fee rates with their floor and cap, the broker and delivery charges and the bank charges. Everything else is arithmetic.
The reason to build this rather than use a web form is that the rates will change and the model has to show which ones did. A calculator with the rates hard-coded into the formulas is a calculator that cannot be updated without being audited line by line.
What follows is a layout that fits on one sheet, the formulas that go in each cell, and the checks that catch the three mistakes this kind of model always makes.
Rates, fee caps and programme lists are revised by the importing authority. Treat every percentage here as a planning range and confirm the line against the official tariff database or a written ruling before it goes into a selling price.
What Goes in the Driver Block?
Every number that comes from outside the model: a quotation, a tariff database or a bank. Nothing in this block is computed. Keep it in one contiguous range at the top, label every row, and put the source and the date it was checked in the column beside it.
That last column is the part people leave out and then regret. A rate cell with no source and no date cannot be defended, and a model with eleven rate cells and no dates is a model nobody trusts in six months.
| Cell | Driver | Value in the example | Source to record |
|---|---|---|---|
| B2 | Order quantity, pieces | 500 | Purchase order |
| B3 | FOB unit price, USD | 4.80 | Supplier quotation |
| B4 | Freight, THC and booking, USD | 285.00 | Forwarder quotation |
| B5 | Marine insurance rate | 0.30% | Policy or forwarder |
| B6 | General duty rate | 17.6% | Tariff database for the line |
| B7 | Origin-based trade-remedy rate | 7.5% | Tariff measure for the origin |
| B8 | Merchandise processing fee rate | 0.3464% | CBP notice |
| B9 | Fee floor, USD | 32.71 | CBP notice for the fiscal year |
| B10 | Fee cap, USD | 634.62 | CBP notice for the fiscal year |
| B11 | Harbour maintenance fee rate | 0.125% | CBP notice |
| B12 | Broker entry and filing, USD | 145.00 | Broker schedule |
| B13 | Drayage and delivery, USD | 210.00 | Carrier quotation |
| B14 | Bank charge per transfer, USD | 32.00 | Bank schedule |
| B15 | Transfers per order | 2 | T/T 30/70 |
| B16 | Exchange rate if booking in another currency | 1.00 | Treasury |
What Goes in the Calculation Block?
Eleven lines, each referencing the driver block by cell rather than by typed value. The customs value line is deliberately separate from the invoice value, because the two are the same in the United States and different in a CIF market, and the model has to show which one the duty is computed on.
The fee line is the one that needs care. A fee with a floor and a cap is clamped, not computed: the value is the middle of the three numbers, which Excel gives you with MEDIAN rather than with a nested IF.
| Cell | Line | Formula | Result in the example |
|---|---|---|---|
| C2 | Invoice value | =B2*B3 | 2,400.00 |
| C3 | Freight, THC and booking | =B4 | 285.00 |
| C4 | Marine insurance | =ROUND((C2+C3)*B5,2) | 8.10 |
| C5 | Customs value | =C2 (or =C2+C3+C4 for a CIF market) | 2,400.00 |
| C6 | General duty | =ROUND(C5*B6,2) | 422.40 |
| C7 | Origin-based duty | =ROUND(C5*B7,2) | 180.00 |
| C8 | Merchandise processing fee | =ROUND(MEDIAN(B9,C5*B8,B10),2) | 32.71 |
| C9 | Harbour maintenance fee | =ROUND(C5*B11,2) | 3.00 |
| C10 | Broker entry and filing | =B12 | 145.00 |
| C11 | Drayage and delivery | =B13 | 210.00 |
| C12 | Bank charges | =B14*B15 | 64.00 |
| C13 | Landed total | =C2+C3+C4+C6+C7+C8+C9+C10+C11+C12 | 3,750.21 |
| C14 | Landed unit cost | =ROUND(C13/B2,2) | 7.50 |
| C15 | Uplift over FOB | =C14/B3-1 | 56.3% |
How Do You Handle the Fee Floor and Cap?
With MEDIAN. The three arguments are the floor, the computed value and the cap, and the function returns the middle one — the floor if the value falls below it, the cap if the value rises above it, and the value otherwise. It is one cell instead of a nested conditional, and it is readable.
Add a flag beside it so the reader knows which branch fired: =IF(C8=B9,"floor",IF(C8=B10,"cap","ad valorem")). On the example the computed figure is USD 8.31 and the floor is USD 32.71, so the flag reads "floor" and the effective fee rate is 1.36% rather than 0.3464%.
| Order size | Value (USD) | Fee at 0.3464% (USD) | Charged (USD) | Flag |
|---|---|---|---|---|
| 300 pcs | 1,440.00 | 4.99 | 32.71 | floor |
| 500 pcs | 2,400.00 | 8.31 | 32.71 | floor |
| 1,000 pcs | 4,800.00 | 16.63 | 32.71 | floor |
| 1,500 pcs | 7,200.00 | 24.94 | 32.71 | floor |
| 2,000 pcs | 9,600.00 | 33.25 | 33.25 | ad valorem |
What Checks Does the Sheet Need?
Three. One for missing inputs, one for a below-minimum order, and one for a base that does not match the market. All three are IF statements that return text, and all three sit at the bottom where they are seen before the number is used.
=IF(COUNTBLANK(B2:B16)>0,"inputs missing","ok") catches a partly filled sheet. =IF(B2<500,"below the 500-piece minimum","ok") catches an order the programme would not run. =IF(AND(C5<>C2,C5<>C2+C3+C4),"base does not match either market","ok") catches a customs value that was typed rather than derived.
How Does the Same Sheet Work for a CIF Market?
One cell changes. In the European Union, the United Kingdom, Australia and the Gulf states the duty base is CIF, so C5 becomes =C2+C3+C4 and the duty is computed on USD 2,693.10 rather than on USD 2,400.00. At the same illustrative 17.6% that is USD 473.99 instead of USD 422.40.
Rather than editing the formula, add a switch. Put the market in a driver cell and write C5 as =IF($B$17="US",C2,C2+C3+C4). One sheet then runs both bases, and the difference between the two is visible in a single cell.
| Market | Customs value cell | Base (USD) | Duty at an illustrative 17.6% (USD) | Difference (USD) |
|---|---|---|---|---|
| United States | =C2 | 2,400.00 | 422.40 | — |
| European Union | =C2+C3+C4 | 2,693.10 | 473.99 | 51.59 |
| United Kingdom | =C2+C3+C4 | 2,693.10 | 473.99 | 51.59 |
| Australia | =C2+C3+C4 | 2,693.10 | 473.99 | 51.59 |
| United Arab Emirates | =C2+C3+C4 | 2,693.10 | 473.99 | 51.59 |

A fourth error is subtler: rounding applied twice. Rounding each duty line to cents and then summing gives a total that differs from summing the unrounded figures and rounding once. The difference is cents on one order and it becomes visible when the sheet is used to reconcile an entry. Round at the end, or accept the convention and apply it everywhere.
How Do You Test the Model?
Three errors account for most broken sheets. The first is a percentage typed as a whole number, so a 17.6% rate entered as 17.6 multiplies the value by 17.6 rather than by 0.176. Format the rate cells as percentages and enter them as 17.6% so the cell and the formula agree.
The second is a currency mixed into a USD model — a freight quotation in another currency pasted straight into a dollar column. Keep one currency in the calculation block and convert at the driver, with the rate and its date in the row beside it.
The third is a reference that drifted because a row was inserted. Use named ranges for the drivers — qty, fob_unit, duty_rate — and the formulas read as sentences and survive insertions. Named ranges are the single largest improvement available to a sheet like this, and they take minutes.
Change one driver at a time and confirm the output moves in the direction it should. Raise the quantity and the unit cost should fall; raise the freight and it should rise; set the duty rate to zero and the landed cost should fall by exactly the duty line.
Then check the two identities. The landed total minus the invoice value should equal the sum of the other lines, and the landed unit cost times the quantity should equal the landed total to within rounding. Both are one-line formulas, and both catch a reference that drifted.
Building a calculator that survives its second use
- Put every external number in the driver block, with its source and the date it was checked.
- Reference the drivers by cell; never type a rate into a formula.
- Keep the customs value as its own line, separate from the invoice value.
- Clamp fees with MEDIAN rather than with a nested conditional.
- Flag which branch of the floor or cap fired.
- Add a market switch for the duty base instead of editing formulas.
- Write three checks: missing inputs, order size, base consistency.
- Test by changing one driver at a time and confirming the direction.
One more input is worth a cell even though it is not a cost: the date the freight quotation expires. Freight is quoted against a market and against a packing, and a quotation used six weeks after it was given is a guess with a number in it. A cell that reads "quote expires" and turns red past the date prevents that.
On presentation: keep the driver block in one screen, freeze the pane so the labels stay visible while the calculation block is scrolled, shade the input cells one colour and leave the calculation cells unshaded, and put the three checks in a band that is visible without scrolling. A calculator that is read by somebody else is a calculator that has to explain itself at a glance.
On sensitivity: the two drivers that move the answer most are the quantity and the duty rate, and neither is under the model control. Add a small block that recomputes the landed unit cost at three quantities and three rates, so the conversation is about the range rather than about one number that happens to be in cell C14 today and will not be there next month.
What Should the Sheet Not Try to Do?
On the chargeable measure: freight is quoted against weight or volume, whichever gives the carrier the greater figure, and bags are usually a volumetric commodity. Add a cell for the carton dimensions and a computed volumetric weight, and compare it with the actual weight. A packing change that adds two centimetres to a carton can move the freight more than a rate change does.
On versioning: save one file per cycle with the date and the market in the name, and keep the driver block untouched in the archived copy. A model that has been overwritten is a model that cannot explain the number it produced last quarter, which is exactly the question that gets asked when a margin is reviewed.
It should not try to be the classification record, the freight quotation or the compliance file. The duty rate belongs in the calculator and the reasoning behind it belongs somewhere else — in the classification record kept with the tech pack, and in the HS code finder where the line and the construction that produced it sit together.
It should also not try to price a programme on its own. Freight is quoted against the market and the packing, and a single forwarder quotation has a validity date. Keep the freight cell dated and re-quote it when the packing list is final.
How Does This Fit the Production Schedule?
The model can be built and run before the goods exist, which is the whole point. Sampling runs 6-10 working days and bulk runs 35-50 days from written sample approval, so the landed cost can be settled during sampling, while a construction or packing change is still possible.
Update it twice: once when the freight is quoted against the actual packing, and once at inspection under AQL 2.5 and ISO 2859-1, when the carton count and the weights are known rather than estimated. Two updates a cycle is enough to keep the number honest.
What Is the Practical Bottom Line?
That the calculator is not the hard part. The hard part is the four cells that come from outside — the line, the rate, the freight and the origin — and the discipline of recording where each one came from. Build the sheet once, keep the drivers dated, and the model stays useful.
Everything else is the standard shape: MOQ 500 pcs, sampling 6-10 working days, bulk 35-50 days from written sample approval, inspection at AQL 2.5 under ISO 2859-1, T/T 30/70, FOB Xiamen. Fifteen inputs, eleven lines, three checks.

Get the calculator built on your numbers
Send the destination market, the order size and the unit price. You get the driver block filled in and the checks wired up.
Frequently Asked Questions
What inputs does a bag landed cost calculator need?
The quantity, the FOB unit price, the freight quote, the insurance rate, the duty rate, any origin-based rate, the fee rates with their floor and cap, the broker and delivery charges and the bank charges.
How do I apply a fee floor in Excel?
With MEDIAN: the floor, the computed value and the cap as the three arguments. It returns the middle one, which is the clamped charge.
Should the customs value be the same as the invoice value?
In the United States it generally is on an FOB sale. In CIF markets it is the invoice value plus freight and insurance, so keep it as its own line.
How do I handle several markets in one sheet?
Put the market in a driver cell and write the customs value as a conditional on it, so one switch runs both bases.
What checks should the sheet have?
One for missing inputs, one for an order below the 500-piece minimum, and one for a customs value that does not match either base.
How often should the model be updated?
Twice a cycle: when the freight is quoted against the actual packing, and when the packing list is final at inspection.
Does the calculator include bank charges?
It should, as a fixed amount per transfer multiplied by the number of transfers. Two transfers under T/T 30/70 is the normal case.
Should recoverable VAT be in the model?
Track it, but keep it out of the unit cost. Cost what you keep and finance what you recover.
What is the landed unit cost in the example?
USD 7.50 a unit with the bank charges included, against USD 7.37 without them, on 500 pieces at FOB Xiamen USD 4.80.
Can one sheet cover several styles?
Yes, with one column per style. Each style has its own line, its own rate and its own quantity, so the driver block becomes a small table.
Where should the duty rate come from?
From the official tariff database for the destination market, recorded with the date it was checked, or from a written ruling where the spend justifies one.
Is a spreadsheet enough for a large programme?
For planning, yes. For filing, no — the entry is made from the commercial documents, and the spreadsheet is the model behind them.
People Also Ask
How do I build a landed cost calculator in Excel?
Put the external numbers in a driver block with their sources, compute each line by reference to those cells, clamp the fees with MEDIAN, and add three checks.
What is the formula for landed cost?
Invoice value plus freight plus insurance plus duty plus fees plus brokerage plus delivery plus bank charges, divided by the piece count.
How do I calculate the merchandise processing fee in Excel?
Compute the ad valorem figure, then clamp it between the floor and the cap with MEDIAN.
Should I use FOB or CIF in my cost model?
Use FOB as the invoice value and derive the customs value from it, because the base differs by market.
How do I make the model reusable?
Keep every external number in one labelled block with its source and date, and never type a rate into a formula.
Sources and further reading
Every figure on this page is either our own programme data or attributed below. Open the originals before you write them into a specification.
- Harmonized Tariff Schedule of the United StatesU.S. International Trade Commission
- Basic importing and exporting: entry, duties and feesU.S. Customs and Border Protection
- Incoterms 2020 rulesInternational Chamber of Commerce