Base Converter – Convert a Number to Any Base

Convert a number from any base to another.

Have a Question or Feedback?



Steps to Convert

Learn how we calculated this below

scroll down

On this page:

How to Convert A Number Base

There are two easy steps to convert a number from one base to another.

The first step is to convert the number to decimal, or base 10, if it is not already. The second step is to convert from decimal to the desired base.

How to Convert From Any Base to Decimal

The first step to convert a number to another base is to convert the number to a decimal. If the number is already a decimal, move on to the next step.

To convert a number to a decimal, use the positional notation method. Multiply each digit in the number from the rightmost number to the left by the base to the power of n, where n is the distance from the right.

So, reading the original number from right to left, the furthest digit to the right is equal to the digit times (base)0. The digit that is one position from the right is equal to the digit times (base)1.

Decimal Conversion Formula

Thus, the decimal conversion formula is:

decimal number10 = (d0 × (base)0) + (d1 × (base)1) + … + (dn – 1 × (base)n – 1)

When using this formula, d0 is the digit furthest to the right, d1 is the digit one position from the right, and dn – 1 is the digit furthest to the left.

For example, let’s convert the hexadecimal number c3f to base 12. Start by converting it to decimal.

decimal number10 = (12 × 162) + (3 × 161) + (15 × 160)
decimal number10 = 3072 + 48 + 15
decimal number10 = 3135

The calculator above can convert hex numbers to decimals, including fractional numbers like this one, along with negative numbers.

How to Convert From From Decimal to Any Base

To convert the decimal number to the desired result base, use the successive division method.

To use the successive division method, divide the decimal number by the desired base using long division. Write the remainder to the side of the division problem. For remainders larger than 9, use the table below to find the equivalent letter digit.

Be sure to keep track of your remainders, in order, because you will need them later on.

Take the resulting quotient of the first division problem and divide that by the desired base again. Just as with the first step, write the remainder to the side of the problem.

Continue this process until the resulting quotient is 0.

The remainders that you wrote to the side of the division problems are the resulting number in the desired base. Read the remainders from the bottom to the top since the least significant digit will be at the top, and the most significant digit will be at the bottom.

Decimal Remainders to Letter Digits

Decimal numbers converted to the equivalent letter digits
Decimal Number Number or Letter Digit
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 a
11 b
12 c
13 d
14 e
15 f
16 g
17 h
18 i
19 j
20 k
21 l
22 m
23 n
24 o
25 p
26 q
27 r
28 s
29 t
30 u
31 v
32 w
33 x
34 y
35 z

Continuing the example above, let’s convert 3135 from decimal to base 12.

3135 ÷ 12 = 261 R 3
261 ÷ 12 = 21 R 9
21 ÷ 12 = 1 R 9
1 ÷ 12 = 0 R 1

Reading the remainders from the bottom up is 1993, so c3f16, which is equal to 313510, is equal to 199312.

Frequently Asked Questions

What is base conversion in math?

Base conversion in math is changing numeral bases. One might go from binary to decimal.

Why is number base conversion important?

Number base conversion is important because it allows us to convert a number between its unique representation systems.

What are the most commonly used number bases?

The most commonly used number bases are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16).

Base Conversion Resources

Use our base conversion resources to learn more about base conversions: