The allocation is the whole problem
Landed cost is simple to define and awkward to compute. The definition is uncontroversial: everything you paid to get a unit into your warehouse, divided by the units. The awkwardness is that the charges do not arrive per unit. Your forwarder bills one freight amount for a container. Customs assesses duty on the shipment. The inspection company invoices per visit, not per SKU. You are left holding four lump sums and a packing list of thirty products, and no obvious way to connect them.
Whatever you do next is an allocation choice, including doing nothing. Spreading freight evenly across SKUs is a choice, and usually a bad one, because it charges a pallet of ceramics the same freight as a box of stickers. The three defensible methods are by value, by weight and by unit count, and which is right depends on what the charge was actually driven by.
Freight is driven by space and mass, so weight is normally the honest allocation, and volumetric weight is closer still if your forwarder billed that way. Duty is assessed on declared customs value, so value is the correct basis and anything else will disagree with your own customs paperwork. Brokerage and inspection are usually per-shipment overheads with no per-product driver at all, in which case units or value are both reasonable and the difference is small. This calculator lets you set a default and then override it per charge, because a real shipment usually needs more than one rule.
Two details matter more than they look. First, freight to your country is very often invoiced in your own currency even though the goods are priced in the supplier's, so each charge here carries its own currency and only the ones that need converting get converted. Second, the arithmetic has to reconcile: your per-line landed costs must add up to the shipment total to the cent, or you will spend an afternoon hunting a rounding difference. Every column below is reconciled exactly, on purpose.