ForHosting KIT · Unit converters

Conversion calculator

2.54 cm is exactly 1 inch: convert length, mass, volume, time, area and energy within one kind at a time, using fixed published factors such as the 1959 inch, so a worksheet or product spec gets the same answer every time. 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
Value
2.54
From
Cm
To
In
You get
Result
1
Kind
length
Factor
0.3937007874
Si unit
m

A conversion calculator maps a finite numeric magnitude from one named unit onto another unit of the same measurement kind using published fixed factors rather than live market rates or affine temperature offsets. Enter the value, the source unit, and the target unit; the solver looks up both names in a closed table of length, mass, volume, time, area, and energy units, converts through the SI hub for that kind, and returns the converted result with the kind, the SI intermediate, and the exact factor applied. Mixing kinds—kilograms with metres, litres with hours—is rejected as an unsupported unit pair. Non-finite values fail the same way.

Which units convert, and how the SI hub works

This conversion calculator covers six measurement kinds that dominate everyday worksheets, product specs, and lab notebooks, and it converts only inside one kind at a time. Length uses the metre as hub, with millimetre, centimetre, kilometre, inch, foot, yard, and mile. Mass uses the kilogram, with milligram, gram, metric tonne, avoirdupois ounce, and pound.

Volume uses the cubic metre, with millilitre, litre, US liquid gallon, and US fluid ounce. Time uses the second, with millisecond, minute, hour, and civil day of exactly eighty-four thousand four hundred seconds. Area uses the square metre, with square centimetre, square kilometre, square foot, acre, and hectare.

Energy uses the joule, with kilojoule, thermochemical calorie, kilocalorie, watt-hour, and kilowatt-hour. Inch, foot, yard, and mile use the 1959 international yard (one inch is exactly zero point zero two five four metres). Pound and ounce use the 1959 international avoirdupois pound.

The US gallon is two hundred thirty-one cubic inches. The calorie is the thermochemical calorie of four point one eight four joules, not a nutrition-label round-off. Temperature is omitted on purpose because Celsius and Fahrenheit need an offset, not a factor, and currency is omitted because exchange rates are not fixed.

Catalog and product-spec exports

Ecommerce and PIM pipelines convert packaged lengths, masses, and volumes into a second unit for mixed-region storefronts without maintaining a private factor spreadsheet.

Lab notebooks and homework checks

Students and technicians convert a measured value into the unit a rubric or instrument table expects and compare the SI intermediate against a hand calculation.

Operations dashboards

Dashboards that ingest mixed unit columns (km vs mi, L vs gal, kWh vs J) normalize readings through one deterministic hub before charting or alerting.

Which measurement kinds does the conversion calculator support?

Length, mass, volume, time, area, and energy. Each kind converts through a published SI hub with fixed factors. Temperature and currency are not supported because they are not fixed-factor conversions.

What happens if I convert kilograms to metres?

Mixed measurement kinds are never converted into a dimensionless ratio, and the failed task is not charged.

How is an inch defined here?

One inch is exactly 0.0254 metres, the 1959 international yard and pound agreement. Feet, yards, miles, square feet, acres, and the US gallon (231 cubic inches) inherit that length standard.

Is the conversion calculator free?

The browser tool is free and runs locally.

Why can't the conversion calculator handle temperature or currency?

Temperature needs an offset as well as a factor, because 0 °C is not 0 °F, and exchange rates change every day. This calculator only uses fixed factors, so it keeps to length, mass, volume, time, area and energy.

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/conversion-calculator

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/conversion-calculator \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value":2.54,"from":"cm","to":"in"}'
{
  "value": 2.54,
  "from": "cm",
  "to": "in"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "conv.conversion_calculator",
  "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.

max_abs1000000000000
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.

Which units convert, and how the SI hub works

Every conversion multiplies the input by how many SI-hub units equal one source unit, then divides by how many SI-hub units equal one target unit: result equals value times to_si of from over to_si of to. Common aliases such as inches, pounds, litres, and kWh are accepted case-insensitively and canonicalized in the response so tests stay stable.

Input contract, response shape, and error behaviour

Value must be a finite number or a strict numeric string whose absolute magnitude does not exceed one trillion. A kilogram-to-metre request is an unsupported unit pair, not a silent dimensionless ratio. Same-unit requests succeed and return the input magnitude with a short note that no change of unit was required. Wire this into catalogs, mobile clients, or batch jobs that already hold a reading and only need a second unit for display or a standards table without shipping a conversion spreadsheet in every binary. Send a JSON body with three required fields: value (aliases amount, quantity, and v), from (aliases from_unit, unit_from, and source), and to (aliases to_unit, unit_to, and target). From and to must resolve to supported unit names after alias normalization, and they must share a measurement kind. On success the response echoes the rounded input value, canonical from and to labels, kind as length mass volume time area or energy, result as the converted magnitude, factor as the exact from-to multiplier, si_unit and si_value as the hub intermediate, formula as the short equation string, message as an English summary, and supported_units as the canonical labels of that kind. Failed validation is never charged: missing fields, non-finite numbers, values outside absolute limits, unknown unit names, and mixed-kind pairs all return invalid_input with a message that names the problem. Pricing is a flat $0.002 per successful request with unit item.

Practical tips, limits, and when to use this landing

Round-trip checks are straightforward: convert A to B and B back to A and confirm you recover the original within the published twelve-decimal rounding. Classic checks include two point five four centimetres to one inch, one mile to one point six zero nine three four four kilometres, one pound to zero point four five three five nine two three seven kilograms, and one US gallon to three point seven eight five four one one seven eight four litres. Prefer sending bare JSON numbers for value when you control the client; string numbers are accepted only when they match a strict finite numeric pattern without currency symbols, thousand separators, or unit suffixes. Normalize display labels on your side if you need locale-specific spellings—this API always returns the short canonical tokens such as cm, in, kg, L, gal, min, ft2, and kWh so automated tests stay byte-stable. Stay inside the absolute range so intermediate SI products cannot overflow IEEE double precision on the Worker or in the browser. This landing targets people searching for a conversion calculator that turns one named unit into another of the same kind with published factors; it is not a temperature converter, not a live currency converter, not a single-pair centimetre-to-inch microsite, and not a general spreadsheet formula engine. Prefer this capability when both endpoints sit in the supported table and you need deterministic factors plus an SI audit trail; if you only need to reformat a number for a locale without changing physical unit, use a number-format tool instead. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when clients deliberately probe mixed kinds or unknown names.

Are results the same in the browser and on the API?

Yes. Both paths call the same isomorphic solve function and round to twelve decimal places, so golden examples that pass locally match production JSON.

Read the full KIT documentation →