Fuel price unit converter
Restate a pump price per US gallon, per imperial gallon or per liter: 3.5 per US gallon is 0.924602183254 per liter in the same currency, because one US gallon holds 3.785411784 liters. Handy for road-trip planning and fleet quotes. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Fuel unit price
- 3.5
- Source price unit
- Per us gal
- Target price unit
- per_L
- Result
- 0.9246021833
- From label
- per US gallon
- To label
- per liter
- Per liter
- 0.9246021833
Fuel is advertised differently around the world: United States stations post dollars per US gallon, the United Kingdom still uses the imperial gallon on many pumps and news tables, and most of Europe, Canada in metric mode, and global commodity sheets quote price per liter. Comparing those figures by hand is easy to get wrong because the two gallon definitions are not the same size, and a naive divide-by-four guess drifts by several percent.
Units, volume factors, and how unit price converts
A fuel unit price is money per unit of volume. When you change the volume unit, the money figure must scale with how many liters sit inside that unit so that the same physical fuel still costs the same amount. Factors follow published definitions: one US liquid gallon is exactly three point seven eight five four one one seven eight four liters (two hundred thirty-one cubic inches), one imperial gallon is exactly four point five four six zero nine liters, and one liter is one liter.
Because the intermediate is always price per liter, converting A to B and B to A is consistent up to the published twelve-decimal rounding, and there is no pairwise matrix that can drift out of sync. Trip fuel-cost calculators that need distance and consumption are a different search intent; this product only rewrites the posted unit price.
For road trips, fleet quotes and news figures
Use the free in-browser fuel price unit converter when you see a holiday road-trip article quoting dollars per US gallon and want the equivalent per liter, or when a UK headline in pence per litre needs a quick imperial-gallon check for readers who still think in gallons. Open the page, enter the posted number and the two units, and copy the result without installing a spreadsheet or a unit library.
Source inputs follow the same retention rules as other KIT parse items, and results are safe to cache because the algorithm is fully deterministic. Authors shipping mobile apps or chatbots can map the result and formula fields directly into cards that show both the converted number and the volume path operators expect on paper.
What you can do with it
Cross-border price comparison
Travel sites and road-trip planners convert US pump prices in dollars per gallon into euros or local currency still shown per liter so readers compare like for like after FX.
Fleet and logistics dashboards
Fleet-card and logistics systems normalize supplier quotes that mix US gallons, imperial gallons, and liters into one unit price column for bidding and KPI boards.
Newsrooms and consumer calculators
Editors and consumer apps restate a headline fuel figure in the volume unit their audience uses without hand-maintained conversion tables.
FAQ
What is the difference between US and imperial gallons?
One US liquid gallon is 3.785411784 liters; one imperial gallon is 4.54609 liters. The converter uses those fixed factors so unit prices scale correctly.
What happens if the price is negative?
Negative fuel unit prices are rejected and are not charged after validation fails.
Is the fuel price unit converter free?
The browser tool runs free on your device.
Why not just divide the gallon price by four?
Because neither gallon is four liters. A US gallon is exactly 3.785411784 liters and an imperial gallon 4.54609 liters, so the divide-by-four guess drifts by several percent and gets worse when you compare across countries.
Does it convert the currency too?
No. It only changes the volume unit, so the price stays in whatever currency you entered. If you also need a different currency, apply an exchange rate to the result as a separate step.
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/conv/fuel-price \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"price":3.5,"from":"per_us_gal","to":"per_L"}'const res = await fetch("https://api.kit.forhosting.com/conv/fuel-price", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"price": 3.5,
"from": "per_us_gal",
"to": "per_L"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/conv/fuel-price",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"price": 3.5,
"from": "per_us_gal",
"to": "per_L"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/conv/fuel-price", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"price":3.5,"from":"per_us_gal","to":"per_L"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"price":3.5,"from":"per_us_gal","to":"per_L"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/conv/fuel-price", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"price": 3.5,
"from": "per_us_gal",
"to": "per_L"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "conv.fuel_price",
"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 capability converts a non-negative fuel unit price among price per US gallon, price per imperial gallon, and price per liter with fixed volume factors, a stable liter intermediate, and deterministic JSON you can pin in tests. Negative prices fail with invalid_input so pipelines never publish a negative pump rate.
Units, volume factors, and how unit price converts
This converter supports three stable canonical codes: per_us_gal for price per United States liquid gallon, per_imp_gal for price per imperial gallon, and per_L for price per liter. Friendly aliases such as gallon, US gal, imperial gallon, UK gal, liter, litre, per liter, and common usd-per-gal strings are normalized case-insensitively so forms and APIs can pass either short codes or full names. Every request divides the input price by the liters-per-unit factor of the source to obtain price per liter, then multiplies by the liters-per-unit factor of the target.
Request shape, response fields, and negative-price errors
Zero is allowed and converts cleanly to zero in every target unit. Send a JSON body with three required fields: price as a finite non-negative number, from as the source price-unit string, and to as the target price-unit string. Aliases value and amount are accepted for price; unit_from and source for from; unit_to and target for to. On success the response echoes the numeric price, the canonical from and to codes, human-readable from_label and to_label strings, the converted result, the intermediate per_liter quantity, the dimensionless factor from source to target, a short formula line suitable for UI display, the method tag fuel_price_volume_units, and the fixed list of units_supported. Missing price, non-finite numbers such as NaN or Infinity, missing unit fields, and any token that does not map to a supported unit fail with invalid_input and are not charged after the engine rejects the request. A negative price is also invalid_input: pump boards, fleet contracts, and comparison widgets should not emit a negative unit rate, so the message states that price must be zero or positive. Identical inputs always yield identical JSON because the path is pure arithmetic with no randomness, no remote lookup, and no dependence on the wall clock, which makes the endpoint safe to pin in continuous-integration goldens and SDK contract tests.
Browser use, API pricing, and everyday fuel-price workflows
Switch to the prepaid API when a travel app, fleet-card portal, gas-price aggregator, logistics dashboard, or newsroom calculator must normalize mixed regional unit prices at scale under a stable KIT contract at $0.002 per successful item; validation failures that raise invalid_input do not consume balance after rejection. Pair this endpoint with a trip fuel-cost tool when the next step is total spend from distance and economy, or call it alone when search traffic is specifically for converting posted fuel prices among US gallons, imperial gallons, and liters.
Technical questions
Which fuel price units does this converter support?
Price per US liquid gallon (per_us_gal), price per imperial gallon (per_imp_gal), and price per liter (per_L). Full names and common aliases are accepted; unknown units raise invalid_input.
How do I convert $3.50 per US gallon to price per liter?
Send JSON with price: 3.5, from: "per_us_gal", to: "per_L". The response result field is the equivalent unit price per liter, plus a per_liter intermediate and a readable formula.