Unit Converter: 2,859 Units Across 75 Categories, With the Working Shown

Most converters give you a number and stop there. You type 5 into the feet box, the screen says 1.524 metres, and you either trust it or you don't. This unit converter shows the two lines of arithmetic that produced the answer, which is the part that matters when the number is going into a datasheet, a purchase order or a lab report.

The tool holds 2,859 units in 75 categories, sorted into nine sections: Chemistry and Misc, Electricity, Energy and Heat, Everyday, Fuel, Geometry, Light and Radiation, Magnetism, Mechanics. Pick a section, pick a category under it, and both unit lists reload with everything that category contains. Nothing is sent to a server; the whole factor table ships inside the page.

What the converter does with your number

The interface is one screen with two columns. On the left you pick the source unit and type the value. On the right you pick the target unit and read the result. Both sides are live: type into the converted-value field and the source field recalculates with the inverted formula, so you can work backwards from a spec sheet without hunting for a second input.

The swap button moves the two units and the two values in one click, which keeps the ratio consistent. Say you have 250 metres on screen and you want the feet value in the source position; after the swap the pair reads 820.20997 feet to 250 metres, and the one-to-one ratio line underneath updates to 1 ft = 0.3048 m.

Under the result sits the derivation block. For an ordinary category it prints two lines: the value multiplied by the source factor to reach the base unit, then that base value divided by the target factor. For temperature it prints the offset version instead. A fixed grid of twelve common pairs below the result card gives you the everyday ratios at a glance, computed from the same table rather than copied from a static string.

The base-unit method, and why one factor per unit is enough

Every category stores a factor that says how many base units one unit of that type is worth. Length uses the metre, mass uses the kilogram, volume uses the cubic metre. A kilometre carries 1000, a centimetre 0.01, an inch 0.0254, a mile 1609.344. With that single column of numbers you can convert between any two units in the category without storing 70,000 pair-specific ratios.

The arithmetic is a multiply followed by a divide:

result = value × from factor ÷ to factor

Five feet to inches runs as 5 × 0.3048 = 1.524 m, then 1.524 ÷ 0.0254 = 60 inches. The base value cancels out, which is why the tool can show both steps and still arrive at the same number a pair-specific table would give you.

Squared and cubed units are stored as their own entries with the exponent already applied. One square foot is 0.09290304 m² and one cubic inch is 16.387064 cm³, not 0.3048 and 0.0254. That single design choice removes the most common source of wrong area and volume figures, because the factor cannot be applied at the wrong power by the user or by the code.

Why temperature cannot be a simple factor

Celsius, Fahrenheit, Kelvin and Rankine share a scale but not a zero point. Treating them as multipliers gives believable answers that are wrong by the size of the offset, which is how people end up preheating an oven to 180 °F instead of 180 °C.

The converter stores temperature as an affine category with kelvin as the base. Each scale carries a factor and an offset, so the forward step is value × factor + offset, and the reverse step is (base − target offset) ÷ target factor. Celsius is factor 1 with offset 273.15; Fahrenheit is 5/9 with offset 255.372222; Rankine is 5/9 with offset 0.

Working through 98.6 °F: 98.6 × 5/9 = 54.7778, plus 255.372222 = 310.15 K. Back out to Celsius: (310.15 − 273.15) ÷ 1 = 37 °C. The derivation block prints both lines, including the offset, so the reason the answer is not a straight multiplication is visible on screen.

One catch that clinical and HVAC work runs into: a temperature difference is not a temperature reading. A 10 °C rise equals an 18 °F rise, but 10 °C as an absolute reading equals 50 °F. Delta-T calculations have to use the scale factor alone, without the offset, and the converter converts readings, so a delta has to be handled with the factor rather than through the temperature category.

What is inside the 75 categories

The coverage is wider than the length, weight and temperature trio most converters stop at, and the sections follow the way engineering tables are usually organised. Electricity carries 15 categories on its own, from charge and current through capacitance, inductance, resistance and conductivity. Mechanics adds 13 more, including torque, moment of inertia, viscosity and flow. Geometry holds 5, Light and Radiation 8, Magnetism 4, Fuel 3, Chemistry and Misc 4, Everyday 12 and Energy and Heat 11.

A sample of the exact factors the table carries:

Quantity From To Exact relationship Example
Length inch millimetre 1 in = 25.4 mm 30 in = 762 mm
Length mile kilometre 1 mi = 1.609344 km 26.2 mi = 42.16 km
Mass pound kilogram 1 lb = 0.45359237 kg 150 lb = 68.04 kg
Volume US gallon litre 1 gal = 3.785411784 L 5 gal = 18.93 L
Pressure psi bar 1 psi = 0.06894757 bar 32 psi = 2.206 bar
Energy BTU joule 1 BTU = 1055.05585262 J 12,000 BTU = 12.66 MJ
Speed knot metre per second 1 kn = 0.514444 m/s 25 kn = 12.86 m/s
Power horsepower watt 1 hp = 745.699871 W 300 hp = 223.7 kW

Those values are definitions, not measurements, so they do not drift. The inch has been exactly 25.4 mm since the 1959 international yard and pound agreement, and the pound has been 0.45359237 kg since the same agreement. Anything that looks like it changed is a different unit with a similar name: the US fluid ounce is 29.5735 mL and the UK fluid ounce is 28.4131 mL, and the two gallons differ by about 20 percent.

Where conversions actually go wrong

The arithmetic is the easy part. Failures cluster around three habits, and none of them are maths errors in the narrow sense.

The first is applying a linear factor to a squared or cubed quantity. A room 12 ft by 10 ft is 120 ft², and 120 × 0.3048 gives 36.6, which is not the area in square metres. The correct figure is 120 × 0.09290304 = 11.15 m². The same slip turns a 350 cubic inch engine into 5,745 cm³ instead of 5,735 cm³, close enough to look right in a conversation and wrong in a specification.

The second is the metric and imperial handoff between documents. A supplier sheet in inches, a listing in centimetres, one number copied without its label. NASA lost the Mars Climate Orbiter in 1999 because one team's software emitted pound-seconds of impulse while the navigation code expected newton-seconds; the spacecraft entered the atmosphere at the wrong altitude and was destroyed, with roughly 327 million dollars spent on the mission.

The third is unit-name collisions. A US short ton is 907.185 kg, a UK long ton is 1016.05 kg and a metric tonne is exactly 1000 kg. Ounce can mean a mass (28.3495 g) or a fluid volume (29.5735 mL in the US), and a pound can mean mass (0.45359237 kg) or force (4.448222 N). The converter lists the variants as separate entries, so the label you pick is the unit you get.

Precision, rounding and the number of digits you should keep

The output is formatted to eight significant digits, with trailing zeros stripped and an exponent switch below 1e-4 or at or above 1e9. Eight digits is more than most inputs deserve. A measurement of 5 pounds has one significant figure, and reporting it as 2.26796 kg claims precision that does not exist; the honest answer is 2 kg.

The tool keeps the full double-precision value underneath and only rounds for display, so chaining conversions through the visible numbers compounds error. Convert inches to centimetres, then feed the displayed centimetres back in, and the second result can drift in the seventh digit. If a chain of conversions matters, keep the intermediate value in the source unit and convert once at the end, or use the reverse field to check that the round trip returns the number you started with.

Frequently Asked Questions

How does this unit converter calculate a result?

It multiplies your value by the source unit's factor to reach the category's base unit, then divides by the target unit's factor. Length uses the metre as its base, mass the kilogram, volume the cubic metre, so five feet becomes 1.524 metres and then 60 inches.

Why is a temperature conversion not a single multiplication?

Celsius and Fahrenheit have different zero points, so each scale needs a factor and an offset. The tool converts through kelvin: 98.6 °F becomes 310.15 K, and that absolute value converts back to 37 °C. Multiplying alone gives a plausible number that is off by the offset.

Does converting square feet to square metres need a different factor?

Yes. A linear factor covers lengths only, so area and volume units carry factors at their own power. One square foot is 0.09290304 m² and one cubic inch is 16.387064 cm³. Reusing a length factor for an area gives a result that is far too small.

How many units and categories are there?

The table holds 2,859 units in 75 categories, grouped into nine sections from Everyday to Electricity. Each category supplies the units that fit its physical quantity, so a length cannot be converted into a weight by accident.

Can I convert from the result field backwards?

Yes. Both value fields are editable, so typing into the converted-value field recalculates the source field with the inverted formula. The swap button moves the units and the values together, which keeps the ratio line correct.

What do the two lines under the result show?

They show the derivation: your value times the source factor, which is the measurement expressed in the base unit, then that base value divided by the target factor. For temperature they show the offset arithmetic instead, ending in kelvin as the intermediate.

Is any of my data uploaded?

No. The factor table is compiled into the page and every calculation runs in the browser, so the values you type stay on your device and the converter keeps working once the page has loaded.

Does it handle both US and UK units?

Yes, and it keeps them apart. US and UK gallons, fluid ounces and tons are separate entries, so you pick the system you mean rather than a silent default.

Felipe Buccioni
Felipe Buccioni

Chile · SO reputation 19896 · Badges: 2🥇32🥈32🥉 · SO member since 2011