LCL (Less than Container Load)
FCL (Full Container Load)
Total cubic meters of cargo
Total gross weight
Rate per CBM or 1000kg (whichever is higher)
Total Volume:0 CBM
Total Weight:0 Tons
Chargeable Volume (W/M):0 w/m
Base Freight Cost:$0.00
Total Surcharges & Fees:$0.00
Total Estimated Cost:$0.00
function toggleInputs() {
var type = document.getElementById('shipmentType').value;
var lclSec = document.getElementById('lcl-section');
var fclSec = document.getElementById('fcl-section');
var lclDetails = document.getElementById('lcl-details');
if (type === 'lcl') {
lclSec.style.display = 'block';
fclSec.style.display = 'none';
} else {
lclSec.style.display = 'none';
fclSec.style.display = 'block';
}
// Hide results when switching
document.getElementById('result-box').style.display = 'none';
}
function calculateFreight() {
var type = document.getElementById('shipmentType').value;
var baseCost = 0;
var totalCost = 0;
// Get Surcharges
var baf = parseFloat(document.getElementById('baf').value) || 0;
var thc = parseFloat(document.getElementById('thc').value) || 0;
var customs = parseFloat(document.getElementById('customs').value) || 0;
var insurance = parseFloat(document.getElementById('insurance').value) || 0;
var fees = baf + thc + customs + insurance;
if (type === 'lcl') {
// LCL Logic
var cbm = parseFloat(document.getElementById('volumeCbm').value);
var kg = parseFloat(document.getElementById('weightKg').value);
var rate = parseFloat(document.getElementById('lclBaseRate').value);
if (isNaN(cbm) || isNaN(kg) || isNaN(rate)) {
alert("Please enter valid Volume, Weight, and Rate for LCL calculation.");
return;
}
// Calculate Revenue Ton (W/M)
// 1 ton = 1000 kg.
// W/M means comparing CBM vs Metric Tons
var weightInTons = kg / 1000;
var chargeable = Math.max(cbm, weightInTons);
baseCost = chargeable * rate;
// Display Details
document.getElementById('res-vol').innerHTML = cbm.toFixed(2) + " CBM";
document.getElementById('res-weight').innerHTML = weightInTons.toFixed(3) + " Tons";
document.getElementById('res-chargeable').innerHTML = chargeable.toFixed(3) + " Revenue Tons";
document.getElementById('lcl-details').style.display = 'block';
} else {
// FCL Logic
var count = parseFloat(document.getElementById('containerCount').value);
var rate = parseFloat(document.getElementById('fclRate').value);
if (isNaN(count) || isNaN(rate)) {
alert("Please enter Container Count and Rate for FCL calculation.");
return;
}
baseCost = count * rate;
document.getElementById('lcl-details').style.display = 'none';
}
totalCost = baseCost + fees;
// Output Results
document.getElementById('res-base').innerHTML = "$" + baseCost.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res-fees').innerHTML = "$" + fees.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('res-total').innerHTML = "$" + totalCost.toLocaleString('en-US', {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('result-box').style.display = 'block';
}
How to Calculate Ocean Freight Rates
Calculating the cost of shipping goods via ocean freight involves understanding the specific pricing models used by logistics carriers. The calculation method differs significantly depending on whether you are shipping a Full Container Load (FCL) or Less than Container Load (LCL).
1. The W/M Principle for LCL Shipments
For LCL shipments, where you share container space with other shippers, freight rates are calculated based on the "Revenue Ton." Carriers compare the volume and the weight of your cargo to determine which is higher.
Volume: Measured in Cubic Meters (CBM).
Weight: Measured in Metric Tons (1 Ton = 1000 kg).
Formula:Freight Cost = Max(CBM, Weight in Tons) × Base Rate
For example, if you ship 2 CBM of cotton weighing 500 kg (0.5 tons), you are charged for 2 units because the volume is greater. Conversely, if you ship 1 CBM of steel weighing 3000 kg (3 tons), you are charged for 3 units because the weight is greater.
2. FCL Pricing Structure
FCL pricing is generally simpler. You pay a flat rate per container (e.g., 20ft or 40ft), regardless of how full it is, provided you do not exceed the maximum weight limit of the container.
3. Understanding Surcharges
The base freight rate is rarely the final price. Several surcharges are often added to the final invoice:
BAF (Bunker Adjustment Factor): A floating surcharge to cover fluctuating fuel oil prices.
CAF (Currency Adjustment Factor): Applied to compensate for currency exchange rate fluctuations.
THC (Terminal Handling Charges): Fees charged by the port terminals for loading/unloading containers.
Customs Clearance: Fees paid to a customs broker to handle documentation.
4. Factors Influencing Freight Rates
Ocean freight rates are volatile and influenced by:
Seasonality: Rates peak during the pre-holiday season (August to October) and Chinese New Year.
Route Capacity: Supply and demand on specific trade lanes (e.g., Asia to North America).
Global Events: Port strikes, canal blockages, or geopolitical tensions can cause rate spikes.
Use the calculator above to estimate your shipping costs by inputting your specific cargo dimensions and quoted rates.