A number base, sometimes called a radix, is simply how many distinct digits a counting system uses before it rolls over into the next place value. The decimal system we use every day is base 10, with the ten digits 0 to 9. Computers, on the other hand, work most naturally in binary, which is base 2 and uses only 0 and 1, while programmers often lean on octal (base 8) and hexadecimal (base 16) as compact ways to write the same binary values. This converter lets you move a whole number freely between all four of those systems. Enter your number as a string of digits, tell the converter which base it is currently written in, and it instantly shows you the equivalent in binary, octal, decimal and hexadecimal. Before converting, it checks that the digits you typed are actually valid for the base you chose, so a binary number can only contain 0 and 1, an octal number only 0 to 7, a decimal number only 0 to 9, and a hexadecimal number the digits 0 to 9 plus the letters A to F. If anything is out of range, you get a clear message rather than a silent wrong answer. Under the hood the tool reads your input in its source base, turns it into a plain numeric value, and then re-expresses that value in each target base. Hexadecimal output is shown in uppercase by convention. It is built for students learning number systems, programmers and electronics hobbyists reading memory addresses or colour codes, and anyone who needs a fast, dependable conversion. Results are reliable for whole numbers up to two to the power of 53.
To read a number written in a given base, each digit is multiplied by the base raised to the power of its position, counting from zero on the right, and the results are added together. To write that value in a new base, you repeatedly divide by the new base and read the remainders. The converter reads your input in its source base to get a plain value, then expresses that value in each target base.
value = dₙ × baseⁿ + ... + d₁ × base¹ + d₀ × base⁰
Valid digits: binary 0–1, octal 0–7, decimal 0–9, hexadecimal 0–9 and A–F.
Take the decimal number 255. In binary it is 11111111, because 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. In octal it is 377, and in hexadecimal it is FF, since 15 × 16 + 15 = 255. All four are different ways of writing the same value.
This calculator is for students learning number systems, programmers and electronics hobbyists working with memory addresses, bit masks or colour codes, and anyone who needs a quick, validated conversion between binary, octal, decimal and hexadecimal.
A number base, also called a radix, is the number of distinct digits a system uses to represent values. Decimal is base 10 and uses the digits 0 to 9. Binary is base 2 and uses only 0 and 1. Octal is base 8 and hexadecimal is base 16, which adds the letters A to F to represent the values 10 to 15.
Each binary digit represents a power of two, doubling from right to left: 1, 2, 4, 8, 16 and so on. Add up the place values where the digit is 1. For example 1111 1111 in binary is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1, which is 255 in decimal.
Hexadecimal is base 16, so it needs sixteen distinct digits. The digits 0 to 9 cover the first ten values, and the letters A, B, C, D, E and F represent the values 10, 11, 12, 13, 14 and 15. This lets a single character stand for four binary digits, which is why hexadecimal is common in computing.
Results are reliable for whole numbers up to two to the power of 53, which is the largest integer that can be represented exactly. Above that, rounding can make a conversion inaccurate.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-06-07 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.