Most commercial failures in e-commerce stem from "hidden freight leakage"—underestimating the true landed cost by omitting domestic drayage, warehouse pick fees, return reserves, or gateway interchange fees. MeritSKU standardizes a 12-factor cost framework calculated exclusively in integer minor units (cents).
1. Why Float Arithmetic Is Prohibited
JavaScript IEEE 754 floating-point numbers famously produce precision errors like 0.1 + 0.2 = 0.30000000000000004. In high-volume catalog evaluation, floating-point rounding errors compound into thousands of dollars of margin discrepancies.
MeritSKU mandates integer cents across the entire codebase. A price of $34.99 is stored and evaluated as 3499.
2. The 12 Comprehensive Cost Factors
The 12 factors that constitute the complete unit landed cost breakdown:
| Factor # | Factor Name | Minor-Unit Representation | Standard Range |
|---|---|---|---|
| Factor 1 | Factory Ex-Works Price (EXW) | factoryCostCents | $3.00 – $25.00 |
| Factor 2 | Factory Tooling & Mold Amortization | toolingAmortizationCents | $0.10 – $1.50 |
| Factor 3 | Origin Drayage & Port Handling | originDrayageCents | $0.15 – $0.80 |
| Factor 4 | International Freight (Ocean / Air) | freightCents | $0.80 – $6.50 |
| Factor 5 | Customs Clearance & Import Duties | customsDutiesCents | 3.5% – 25.0% |
| Factor 6 | Destination Port Drayage & Chassis | destinationDrayageCents | $0.20 – $0.90 |
| Factor 7 | 3PL Receiving & Pallet Inbound | inboundHandlingCents | $0.25 – $0.75 |
| Factor 8 | Warehouse Storage Reserve (30-Day) | storageMonthlyCents | $0.15 – $0.60 |
| Factor 9 | Pick, Pack & Carton Materials | pickPackCents | $2.20 – $4.50 |
| Factor 10 | Domestic Last-Mile Carrier Freight | outboundShippingCents | $4.50 – $9.50 |
| Factor 11 | Returns & Damaged Goods Reserve | returnsReserveCents | 3.0% – 8.0% of MSRP |
| Factor 12 | Payment Gateway & Platform Fees | gatewayFeesCents | 2.9% + 30¢ |
3. Full Worked Calculation Example
Consider an Ergonomic Lumbar Support Cushion selling at $34.99 (3499¢). The complete 12-factor calculation resolves as follows:
{
"sku": "LUMBAR-CUSHION-01",
"retailPriceCents": 3499,
"factors": {
"factoryCostCents": 540,
"toolingAmortizationCents": 25,
"originDrayageCents": 32,
"freightCents": 185,
"customsDutiesCents": 78,
"destinationDrayageCents": 44,
"inboundHandlingCents": 35,
"storageMonthlyCents": 28,
"pickPackCents": 295,
"outboundShippingCents": 580,
"returnsReserveCents": 175,
"gatewayFeesCents": 131
},
"totalLandedCostCents": 2148,
"netContributionMarginCents": 1351,
"netMarginPercentage": "38.61%"
}4. Reconciliation with Accounting Ledgers
Because all factors sum to the exact penny without floating-point error, MeritSKU reports export cleanly to QuickBooks, NetSuite, and Xero standard general ledgers.
Was this guide helpful?
Your feedback trains our editorial documentation standards.