ForHosting KIT · Unit converters

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
Use it from WebAPIEmailTelegramApp soon
If you enter
Fuel unit price
3.5
Source price unit
Per us gal
Target price unit
per_L
You get
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.

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.

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.

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.

POSThttps://api.kit.forhosting.com/conv/fuel-price

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.

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"}'
{
  "price": 3.5,
  "from": "per_us_gal",
  "to": "per_L"
}
{
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

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.

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.

Read the full KIT documentation →