All tools › Math Calculators › Algebra
Convert a number from any base (2 to 36) to any other, with binary, octal, decimal and hex shown together.
Convert a number between any two bases from 2 to 36
A number base, or radix, is how many different digits a number system uses. Decimal is base 10, binary is base 2, hexadecimal is base 16. This base converter takes a number written in any base from 2 to 36 and rewrites it in any other, and shows the same value in binary, octal, decimal and hexadecimal alongside.
Bases above 10 need extra digits, so the letters A to Z stand for the values 10 to 35. The page checks every digit against the base you chose, shows the place-value expansion of what you typed, and can also convert a part after the point.
How to use the base converter
- Type the Number to convert. Letters can be upper or lower case; spaces and commas are ignored. A minus sign in front and one point are allowed.
- Enter the From base, the base the number is written in.
- Enter the To base, the base you want.
- The main result is in the target base; the rows give the standard bases.
How the conversion works
value = dn x bn + … + d1 x b1 + d0 x b0 + d-1 x b-1 + …
Here b is the base, each d is a digit value from 0 to b – 1, and the exponent is the digit’s position counted from the point: 0, 1, 2 to the left and -1, -2 to the right. The conversion has two halves:
- Reading: each digit is multiplied by its place value and the products are added. That gives the value of the number.
- Writing the whole part: the value is divided by the new base again and again. The remainders, read from last to first, are the new digits.
- Writing the part after the point: the fraction is multiplied by the new base again and again. Each time, the whole part that appears is the next digit.
The fraction is kept as an exact ratio of whole numbers, so its digits are not affected by rounding.
Worked example: 3D7 from base 16 to base 5
Type 3D7, set the from base to 16 and the to base to 5. The result is 12413. The place-value table shows how the hexadecimal number is read:
| Digit | Digit value | Place value | Digit x place (decimal) |
|---|---|---|---|
| 3 | 3 | 16^2 = 256 | 768 |
| D | 13 | 16^1 = 16 | 208 |
| 7 | 7 | 16^0 = 1 | 7 |
The last column adds up to 983, which is the decimal row. The other rows give 1111010111 in binary and 1727 in octal. Other runs: 1000 in base 10 is RS in base 36, and 777 in base 8 is 511 in base 10.
Numbers with a point
Some fractions end in one base and go on forever in another, just as one third is 0.333… in decimal. The converter gives up to 10 digits after the point and tells you which case you have.
- 0.375 in base 10 becomes 0.011 in base 2, and the page marks it as exact with 3 digits.
- 0.1 in base 10 becomes 0.0001100110… in base 2. The three dots mean the digits never end; they are cut off after 10 digits, not rounded.
- 2A.8 in base 16 becomes 101010.1 in base 2, which is 42.5 in decimal.
The second line is the reason computers, which store numbers in binary, cannot hold 0.1 exactly.
Limits and assumptions
- The whole part can be at most 253 – 1, which is 9,007,199,254,740,991. Larger numbers are refused, not rounded.
- The part after the point has a length limit that depends on the base, so that it can be converted exactly: 14 digits in base 10 and 9 digits in base 36, for example. The error message states the limit for your base.
- A negative number is shown with a minus sign. Two’s complement and other fixed-width computer formats are not used.
- Only the standard digit set 0 to 9 then A to Z is supported, so the highest base is 36. Encodings such as Base64 are not covered.
Frequently asked questions
Why does every base write its own base as 10?
Because 10 means one of the base and zero ones. Twelve in base 12 is 10, sixteen in base 16 is 10, and two in base 2 is 10.
Which bases are used in practice?
Base 10 for everyday counting, base 2 inside computers, and bases 8 and 16 as compact ways to write binary. Base 60 survives in minutes and seconds.
How can I tell which digits a base allows?
A base uses digits from 0 up to one less than the base. Base 8 has 0 to 7, so 8 and 9 are not valid there, and base 16 runs from 0 to 9 and then A to F.
Is a larger base more precise?
No. The base changes how a value is written, not the value itself. A larger base just needs fewer digits for the same number.
Related calculators
- Binary Calculator – arithmetic and AND, OR, XOR on binary numbers.
- Hex Calculator – arithmetic in base 16 with the conversion steps.
- Exponent Calculator – powers of a base for place values.
- Modulo Calculator – the remainders used in the division method.

