FOB Price Calculation: An AI-Built Costing Sheet for Exporters

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for FOB Price Calculation: An AI-Built Costing Sheet for Exporters.
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for FOB Price Calculation: An AI-Built Costing Sheet for Exporters.

FOB price = ex-works cost + export packing + transport to the port + origin port charges + export clearance and documents + your margin, divided by the number of units. Work the margin as a share of the selling price, not as a markup. AI can build the costing sheet and a currency test in minutes, but you supply and approve every cost line.

FOB means "free on board": the seller delivers the goods on board the vessel the buyer has arranged, at the named port of shipment, and pays for everything up to that point. Main sea freight and insurance belong to the buyer. A sheet that mixes the two sides is a quick way to quote a price that loses money, so build the seller's side line by line and leave the voyage to the buyer.

Follow me on Instagram@sagnikteaches

What FOB covers and what it leaves to the buyer

Under the Incoterms 2020 rules published by the International Chamber of Commerce, FOB is for sea and inland waterway transport. The seller clears the goods for export, delivers them on board the vessel, and the risk passes to the buyer once the goods are on board. Because a container is normally handed to a terminal or carrier before it is lifted aboard, the ICC's usual advice for containerised cargo is FCA instead, where the seller delivers to the carrier. If your buyer says FOB for a container, agree in writing what both of you mean, and confirm the wording with your forwarder.

Connect on LinkedInSagnik Bhattacharya
CostIn an FOB price?
Making or buying the goodsYes
Export packing, pallets, markingYes
Truck or rail from factory to portYes
Origin port or terminal handling, loadingYes (check how your forwarder invoices it)
Export customs clearance and export documentsYes
Certificate of origin, if the buyer asks for oneUsually priced in by the seller; say so in the quote
Main sea freightNo, the buyer's cost (CFR and CIF add it)
Cargo insurance for the voyageNo (CIF adds it)
Import duty, taxes, destination chargesNo

A worked example: 2,000 hand-woven cotton rugs

This is an illustration, with figures invented to show the method. A small workshop has an enquiry for 2,000 cotton rugs, FOB at its nearest large port. The owner builds the cost per line and works back to a price that earns an 18 percent margin on the selling price.

Subscribe on YouTube@sagnikteaches
LineBasisCost for 2,000Per unit
Ex-works cost: materials$4.80 a unit$9,600$4.80
Ex-works cost: labour$2.10 a unit$4,200$2.10
Ex-works cost: overhead share$1.10 a unit$2,200$1.10
Export packing, pallets, marking$0.35 a unit$700$0.35
Inland freight, factory to portone truck, quoted$620$0.31
Origin port handling and loadingforwarder's quote$380$0.19
Export clearance and documentsbroker $150, documents $120$270$0.135
Total cost to deliver on board$17,970$8.985

To get an 18 percent margin on the selling price, divide cost by (1 - 0.18) = 0.82. $17,970 / 0.82 = $21,914.63, so the FOB price per unit is $10.957, which the owner rounds up to $10.96. The order total at that price is $21,920, giving a margin of $3,950, which is 18.0 percent of the price. The figures check out in the sheet, and they are what the owner can quote.

If you add 18 percent as a markup instead, $17,970 x 1.18 = $21,204.60, or $10.60 a unit. The margin on that price is only 15.3 percent, which is $3,235 rather than $3,950. On 2,000 rugs the confusion costs $715. That is the first thing to look for when a sheet comes back from a colleague.

The Complete Excel Course with AI Integration thumbnail

The Complete Excel Course with AI Integration

From formulas and pivot tables to Power Query, DAX, VBA and AI with Copilot, ChatGPT and Claude — hands-on from the first lesson.

By Sagnik Bhattacharya and Virginia Thorn, Primetime Emmy Award winner

Buy now

Prompt 1: build the sheet with formulas, not just numbers

Ask the AI to create a spreadsheet layout you can paste in, with cells for inputs and formulas that update, so you can change the quantity or cost and watch the price move. Give it the line items and the rule for margin.

Build me an export costing sheet for Excel or Google Sheets for an FOB quote. Show the layout as a table with cell references and the formula for each calculated cell.

Inputs (each in its own labelled cell): quantity; materials cost per unit; labour per unit; overhead per unit; export packing per unit; inland freight (total); origin port handling (total); broker fee (total); documents and certificates (total); target margin as a percentage of selling price.

Calculations: ex-works cost per unit; total cost to deliver on board; FOB price per unit = total cost / (1 - target margin) / quantity, rounded up to the nearest cent; order total; margin in dollars; margin as a percentage of price (check cell that must equal the target).

Add a check row that flags if margin percent is not within 0.1 of the target. Explain markup versus margin in one sentence under the table.

A reasonable reply gives you a grid like B2 = quantity, B10 = SUM of the cost cells and B12 = B10 / (1 - B11) / B2. Paste it, type in your figures, and make sure the margin check cell shows 18.0 percent. If you are new to this, my guide to using ChatGPT with Excel shows how to ask for a formula and test it. The thing to fix in what comes back is often the rounding: if the sheet rounds before multiplying by quantity, the order total is slightly off. Round the unit price once, then multiply.

Testing exchange rates before you send the quote

Many exporters pay costs in their own currency and quote in a stronger or more widely used one. Between the quote and the payment, the rate moves. If the rate shifts against you after you have fixed the price, the margin shrinks. The sensitivity test is a small table showing the margin at several rates.

Suppose the $17,970 cost above was converted at the rate on the day of the quote, and that the workshop's own currency strengthens against the quote currency by 5 percent by payment day. In dollar terms its costs rise 5 percent: $17,970 x 1.05 = $18,868.50. The price is still $21,920, so the margin falls to $3,051.50, which is 13.9 percent of the price. At an 8 percent move the cost is $19,407.60 and the margin $2,512.40, or 11.5 percent. If the currency weakens 3 percent, cost drops to $17,430.90 and the margin rises to 20.5 percent.

Home currency move against quote currencyCost in quote currencyMargin on $21,920Margin %
3% weaker$17,430.90$4,489.1020.5%
No change$17,970.00$3,950.0018.0%
3% stronger$18,509.10$3,410.9015.6%
5% stronger$18,868.50$3,051.5013.9%
8% stronger$19,407.60$2,512.4011.5%

This treats all costs as paid in the home currency. If some are in the quote currency already, such as imported yarn priced in dollars, only the home-currency part moves. In the rug example the $9,600 of materials might be paid in dollars, which means only $8,370 of cost is exposed, and the 5 percent move costs $418.50 instead of $898.50. Ask the AI to split cost lines by currency in the sheet so the exposure is visible.

Add a sensitivity table to my costing sheet. Column A: cost lines. Column B: amount. Column C: currency of payment (home or quote currency). Then create a table of margin percent at home-currency moves of -3%, 0, +3%, +5%, +8%, showing only home-currency costs moving. Highlight in red any margin below 12%. Give me the formulas.

What you decide from the table is a policy: the lowest margin you will accept, and what you do about it. Options include a short quote validity (seven to fourteen days), a clause allowing a price adjustment if the rate moves beyond a set band, a deposit on order, asking your bank about a forward contract so the rate is fixed, or simply building a buffer into the margin. A quoted price with no stated validity is an open-ended bet.

Second example: a food producer shipping part-loads

Costs behave differently when the shipment is small. Say a producer of packaged spice blends ships six pallets, not a full container, and the forwarder charges for the origin terminal by weight and pallet, not per shipment. Inland freight is $240 for the six pallets and origin handling $65 a pallet ($390). The easy mistake is to reuse the per-shipment figures from the large order, which makes the quote too low per unit.

The lesson for the sheet: keep every cost in a column marked "per shipment", "per pallet" or "per unit", and have the sheet convert to totals from quantity. Then a change from six to twelve pallets rescales every line correctly, and you see which costs drop per unit with volume (the broker fee) and which do not (pallet handling).

Food also needs extra documents, such as health or phytosanitary certificates and a certificate of origin. The buyer may ask for the last of these, and my tutorial on what AI prepares and what the chamber issues covers it. Give each certificate its own line, including the chamber fee, so it is not forgotten.

From FOB to CFR and CIF when the buyer asks for a delivered price

Buyers often ask for CFR (cost and freight) or CIF (cost, insurance and freight), which add the main sea freight and, for CIF, insurance. Quote them only after you get freight and insurance quotes from your forwarder for that route and date. Add the freight line to the FOB total to get CFR, then add insurance to get CIF.

In the rug example, if the forwarder quotes $1,900 for the sea freight on that lot, CFR is $21,920 + $1,900 = $23,820, or $11.91 a unit. If insurance is quoted at $95, CIF is $23,915, or $11.96. Freight rates move often and quotes expire, so build in the validity date from the forwarder's quote and put it on yours. The buyer who wants CIF is also asking you to take on the risk of the freight price changing between quote and booking, so it can be wise to keep to FOB for a first order and let the buyer's own forwarder deal with freight. For help with the freight email side, see AI freight quoting from customer emails.

Where each cost line comes from, and how to get it in writing

A sheet is only as good as the figures behind it. Before you type a number into a cell, know where it came from and how old it is. This is the checklist I would use, and the part AI can help with is drafting the requests, not supplying the numbers.

  • Materials and labour. From your own purchase records and payroll for the last comparable job, adjusted for any price rises since. Ask AI to compare the last three jobs' costs per unit and show the spread. If the spread is wide, quote from the high end.
  • Overhead share. Divide the month's overheads (rent, utilities, admin) by the units made that month, so the figure follows output. A fixed overhead figure copied from last year undercharges you in a quiet month.
  • Export packing. A quote from your carton supplier and pallet supplier. Include any treatment your buyer or the destination demands for wooden pallets.
  • Inland freight. A haulier's quote for your exact route and load, with its validity date.
  • Origin port handling and loading. From your forwarder, itemised, because some quote it as one figure and others add small extras.
  • Clearance and documents. A broker's fee schedule, the fee for any certificate your buyer needs, and bank charges for the payment method.

A short email prompt gets the forwarder's quote in a usable form: ask for every origin charge itemised, for the validity date and for what is excluded. Paste the reply into the AI and ask it to list each charge as a row in your sheet's format, marking anything unclear as "ask". That removes the retyping errors that creep into hand-built sheets.

How the price falls as quantity rises

Some costs are paid once per shipment, others per unit, so the unit price falls as the order grows. In the rug example, treat the broker fee ($150), documents ($120) and a minimum port handling charge ($180) as fixed at $450 a shipment, and the rest as $8.76 a unit (materials, labour, overhead, packing, trucking and variable handling). That reproduces the $17,970 at 2,000 units. At an 18 percent margin on price, with each unit price rounded up to the cent as in the sheet, the FOB price per unit for different quantities is:

QuantityTotal costFOB price per unitOrder total
500$4,830$11.79$5,895
1,000$9,210$11.24$11,240
2,000$17,970$10.96$21,920
5,000$44,250$10.80$54,000

The shape is useful to a buyer who asks for a better price. Between 500 and 2,000 units the price falls by about 7 percent, and it flattens after that because most of your cost is per unit. If a buyer asks for a 10 percent discount at 2,000 units, the table tells you that no volume effect can pay for it, and the discount would have to come from your margin. Ask the AI to produce this table from your sheet using the fixed and per-unit split, then present two or three price breaks in the quote.

One caution: at a larger quantity the factory may need overtime or extra materials bought at less favourable prices, so the per-unit cost can rise rather than fall. Check with production before you promise a break at the top of your range.

Drafting the quote email from the sheet

With the sheet complete, a short prompt turns the numbers into a clean quote email. Paste in the key outputs and your terms, and keep the AI to what you give it.

Write a quote email to an overseas buyer. Use only these facts:
- Product: hand-woven cotton rugs, 2,000 units
- Price: $10.96 per unit FOB [named port], total $21,920
- Incoterms 2020 rule: FOB; goods delivered on board the vessel nominated by the buyer
- Packing: export cartons on pallets
- Payment: 30% deposit with order, balance before loading
- Lead time: 6 weeks from deposit
- Quote valid for 10 days
- Not included: sea freight, insurance, import duty and taxes

Tone: clear and friendly, under 150 words. Use [first name] and [your name] placeholders. Do not add any promise about delivery dates or quality that I have not given.

Check the reply for three things: the named port is right, the validity date is stated, and the "not included" line stays in. AI sometimes tidies away a limiting sentence because it reads as negative. If you want more on replying to enquiries quickly, AI tools for exporters: answer buyer enquiries and draft quotes goes further, and AI tools for shipping documents covers the invoice and packing list that follow once the order is confirmed.

The quote that lost money: a missed line

Here is an illustration. A small exporter of kitchen utensils won an order at a price that looked healthy on the sheet, a 22 percent margin. The shipment left on time and the owner then found two costs that were not in the quote: a terminal handling charge billed by the forwarder at the origin port, and a cost to re-palletise because the buyer's carrier refused the original pallet height. Together they were $540 on an order of $9,800, which took the margin to about 16.5 percent.

The repair is a checklist the sheet always carries, not a clever formula: terminal handling, pallet or carton changes, inspection if the buyer requires one, bank charges for the payment method, certificate and document fees, and a contingency line of one to two percent of cost. A contingency line looks cautious until it saves a quote. Keep a record of what each shipment actually cost, and compare it with the quote afterwards so the next sheet is better.

Checking the sheet before you send it

  1. Recalculate the price by hand from the total cost and target margin. Divide by 0.82 and check the sheet agrees.
  2. Check each line has a quote or a document behind it, even a short email from the forwarder. An estimate marked "assumed" in a column is fine, a blank is not.
  3. Look at the margin at the weakest exchange rate you consider plausible and ask whether you would still ship.
  4. Compare with your last three similar orders. If today's FOB price per unit is far from earlier ones, find out why.
  5. Read the terms wording. The quote should name the Incoterms rule and edition, the named port, validity and what is excluded.

Treat AI as the builder and as a second checker: after you finish, paste the finished table back and ask it to find arithmetic errors, missing cost types for your product and any line that looks out of proportion. It will sometimes flag a cost you have not thought of, such as fumigation of wooden pallets. Trade rules, customs and tax questions belong with a qualified adviser. If you would like to set up a sheet and routine around your own products and customers, my AI implementation consultation includes it.

Questions about FOB pricing

What costs go into an FOB price?

The cost of making or buying the goods, export packing, transport to the port, the seller's port and terminal charges for loading, export customs clearance and documents, plus your margin. The main sea freight and cargo insurance are not part of FOB. They are the buyer's cost, unless you quote a different term such as CFR or CIF.

What is the difference between markup and margin?

Markup is added to cost, margin is the share of the selling price. A 20 percent markup on a cost of $100 gives a price of $120 and a margin of 16.7 percent. To reach a 20 percent margin you divide cost by 0.80, giving $125. Mixing them up is an easy way to under-price a quote.

Is FOB right for container shipments?

Often not. FOB is written for goods loaded on a ship, while containers are usually handed to a terminal or carrier before loading. The ICC's guidance for containers is generally to use FCA, where the seller delivers to the carrier. Agree the term with your buyer and forwarder, and check the Incoterms 2020 text.

How should I handle currency changes in a quote?

Quote in the buyer's currency only for a short validity period, and test your margin at a few exchange rates before you send. Options include a shorter quote validity, a price-adjustment clause, matching currencies of costs and income, or asking your bank about a forward contract.

Further reads

Sources: ICC Incoterms 2020 page; ICC Academy, Incoterms 2020: FCA or FOB?; trade.gov, Know Your Incoterms (rules by transport mode); worked figures are illustrative. Confirm terms with your forwarder or a trade adviser.

Want quotes that hold their margin when rates move?

On a 1:1 call we can map how you price export orders today, build a sheet that updates from your own costs, and decide where AI helps and where a person must approve.

Book a 1:1 call with me