This decimal to binary calculator converts an ordinary base ten whole number into binary, the base two number system that every computer uses internally to store and process data. You simply enter a whole number, positive or negative, and the calculator instantly returns three results together: the binary form built from 0s and 1s, the hexadecimal equivalent, and the octal equivalent, so you can compare all three number systems at a glance. Binary works by giving each digit position a value double the one to its right, so converting by hand means dividing the number repeatedly by 2 and reading the remainders from the last one back to the first, exactly as shown in the worked example on this page using 13, which becomes 1101 in binary, D in hexadecimal and 15 in octal. If you enter a negative number, the calculator works with its magnitude and adds a leading minus sign to the result; anyone needing a fixed-width signed format instead should use the two’s complement calculator. This tool suits students learning number systems, programmers debugging bit-level logic, and anyone curious about how computers represent numbers under the hood. It assumes you enter a genuine whole number, uses exact integer arithmetic rather than an approximation, and groups very large results for easier reading. Update the number at any time and every result recalculates immediately.
To convert to binary, repeatedly divide the number by 2 and record the remainders, then read them from last to first. Each binary digit is a power of two, so 1101 is 8 + 4 + 0 + 1 = 13.
13 divided by 2 gives remainders 1, 0, 1, 1 reading upward, so 13 in binary is 1101. In hexadecimal it is D and in octal 15. Enter 13 to confirm.
Divide by 2 repeatedly, noting each remainder, then read the remainders from bottom to top.
1101, which is 8 + 4 + 1.
This calculator shows the magnitude with a minus sign. For signed fixed-width binary, use the two’s complement calculator.
This calculator is for students, programmers and anyone exploring number theory.
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.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
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-07-19 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.