Shipping fuel surcharge calculator
Turn a base shipping rate and the current fuel percentage into the amount to bill: a 48.5 base at 12.5% adds a 6.06 surcharge for a 54.56 freight total. You enter both figures, nothing is looked up. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Base rate
- 48.5
- Surcharge percent
- 12.5
- Surcharge amount
- 6.06
- Total freight
- 54.56
Carriers and parcel networks publish fuel surcharges as a percentage of the base transportation charge, so the amount you bill a customer is never just the list rate from the zone chart. Ops teams, marketplace sellers, and freight brokers need a single deterministic step that turns a known base rate and the current fuel percentage into the surcharge dollars and the all-in freight total.
How a percentage fuel surcharge turns a base rate into total freight
A fuel surcharge is almost always expressed as a percentage of the base transportation or shipping charge for a given service level, weight band, and destination zone. If the carrier quote or your rate card shows a base rate of forty-eight point five currency units and the published fuel factor is twelve point five percent, the surcharge amount is base times percent divided by one hundred, and the total freight charge is base plus that surcharge—or equivalently base times one plus percent over one hundred.
Working the numbers by hand is easy for a single parcel and painful when you reconcile a weekly invoice with hundreds of lines, each with a different base and the same weekly fuel table. This capability implements exactly that two-step identity with no carrier network lookup and no date-dependent table: you supply the base rate you already know and the surcharge percent that applies for the period you are pricing.
Money outputs are rounded half-up to two decimal places so that floating-point intermediates such as six point zero six two five become six point zero six for the surcharge and fifty-four point five six for the total, matching common accounting and invoice line conventions.
Where a fuel surcharge calculator saves time
Ecommerce platforms use a fuel surcharge calculator so checkout and back-office tools can show landed freight that matches carrier weekly bulletins without hard-coding a new constant every Monday. Third-party logistics operators and freight brokers need a deterministic oracle for quote emails, rate cards, and margin checks when the same base appears under different fuel tables by region or service.
Keep the base and percent as the only inputs, pin rounded money fields in tests, and you get reproducible freight totals for marketplaces, WMS plugins, and edge workers without standing up a full rating engine of your own.
What you can do with it
Checkout and landed shipping display
Show shoppers or B2B buyers the all-in freight charge by applying the current carrier fuel percentage to the quoted base shipping rate before payment.
Invoice and carrier audit lines
Rebuild surcharge and total freight for each base line when reconciling weekly carrier invoices against the published fuel table for that period.
Quote emails and rate cards
Generate broker or 3PL quotes that list base rate, fuel surcharge amount, and total freight from a single percentage input shared across many SKUs.
FAQ
Does this look up live carrier fuel tables?
No. You supply the percentage that applies for the period you are pricing.
How is a shipping fuel surcharge calculated?
Multiply the base rate by the fuel percentage and divide by one hundred, then add that amount to the base for the total. A base of 100 at 8% gives a surcharge of 8, which is then added to the base.
How are the surcharge and total rounded?
Both are rounded half up to two decimal places, matching common invoice lines. A base of 48.5 at 12.5% therefore shows a surcharge of 6.06 and a freight total of 54.56.
Can the base rate or fuel percentage be zero?
Yes. Either one at zero simply gives a zero surcharge, so the total equals the base. Negative values are refused, and the fuel percentage cannot go above one thousand percent.
Should I enter 12.5 or a decimal fraction for 12.5%?
Enter 12.5. The fuel figure is read as a percentage of the base rate, exactly as carriers publish it in their fuel tables, so there is no need to convert it to a decimal first.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/ecom/fuel-surcharge \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"base_rate":48.5,"surcharge_percent":12.5}'const res = await fetch("https://api.kit.forhosting.com/ecom/fuel-surcharge", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"base_rate": 48.5,
"surcharge_percent": 12.5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/ecom/fuel-surcharge",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"base_rate": 48.5,
"surcharge_percent": 12.5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/ecom/fuel-surcharge", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"base_rate":48.5,"surcharge_percent":12.5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"base_rate":48.5,"surcharge_percent":12.5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/ecom/fuel-surcharge", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"base_rate": 48.5,
"surcharge_percent": 12.5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "ecom.fuel_surcharge",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
This shipping fuel surcharge calculator accepts the base shipping rate and the fuel surcharge percent, multiplies the base by percent over one hundred for the surcharge amount, adds that amount back to the base for total freight, and rounds money fields half-up to two decimal places so invoices and API clients stay aligned. Zero base or zero percent is allowed and yields a zero surcharge; negative inputs fail with invalid_input and are not billed.
How a percentage fuel surcharge turns a base rate into total freight
The response echoes the inputs you sent, returns surcharge_amount and total_freight, and includes a short formula string you can surface in a UI or audit log next to the numbers.
Input contract, response shape, and validation behaviour
Base rate is capped at one trillion money units and surcharge percent at one thousand percent so runaway automation cannot overflow display paths. A base of one hundred with eight percent yields surcharge eight and total one hundred eight. Invalid requests are not billed. POST a JSON body with two required finite non-negative numbers: base_rate, the shipping or freight amount before fuel (also accepted under aliases shipping_rate, rate, base_shipping_rate, and freight_base); and surcharge_percent, the fuel percentage such as twelve point five for twelve point five percent (aliases fuel_surcharge_percent, percent, fuel_percent, and surcharge_pct). Each field may arrive as a JSON number or as a numeric string; empty strings, missing fields, non-finite values, and negatives fail with invalid_input naming the field. On success the body includes base_rate and surcharge_percent as normalized numbers, surcharge_amount and total_freight as half-up two-decimal money, and formula restating the identity. Example: base_rate forty-eight point five and surcharge_percent twelve point five yields surcharge_amount six point zero six and total_freight fifty-four point five six. Pair this endpoint with your own zone-rate or dimensional-weight step if you still need to derive the base; this calculator only applies the fuel percentage once the base is known.
Where a shipping fuel surcharge API earns its keep
Spreadsheet replacements and low-code automations call the API so finance can reprice historical shipments when auditing a disputed invoice line that used last month’s fuel factor.
Technical questions
How do I calculate a shipping fuel surcharge?
Send non-negative base_rate and surcharge_percent. The API returns surcharge_amount = base_rate × surcharge_percent / 100 and total_freight = base_rate + surcharge_amount, with money rounded half-up to two decimals.
What units should I use for base_rate?
Any consistent money units (USD, EUR, etc.). The calculator is unit-agnostic: it multiplies and rounds; it does not convert currencies or look up carrier tables.
Can surcharge_percent be zero or over 100?
Zero is allowed and yields a zero surcharge. Values above 100 are allowed up to 1000 for extreme temporary tables; negative percent is rejected as invalid_input.
What does the shipping fuel surcharge calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.