Decimal to Hexadecimal Converter

Convert any decimal (base 10) number into hexadecimal (base 16) instantly. Enter a whole number below and see the result, plus the step by step division-remainder working and the binary and octal equivalents.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
Reference tool  Standard base conversion, using the division-remainder method.

1. Enter Decimal Number

2. About This Conversion

Hexadecimal (base 16) uses the digits 0 to 9 and the letters A to F. Each hex digit represents exactly 4 binary bits, which is why hexadecimal is the standard shorthand for binary data in computing, colour codes and memory addresses.

Only non-negative whole numbers are supported. Negative numbers are shown using a leading minus sign on the hex result.

Conversion Result

Hexadecimal
-
Base 16
Decimal
-
Base 10 (input)
Binary
-
Base 2
Octal
-
Base 8

Division-Remainder Working

Read remainders bottom to top-

Digit Breakdown

Total-
Result: Enter a decimal number above.

How to Convert Decimal to Hexadecimal

To convert a decimal number to hexadecimal, repeatedly divide the number by 16 and record the remainder at each step. Convert each remainder into its hex digit (values 10 to 15 become A to F). Once the quotient reaches 0, read the remainders in reverse order, from the last one calculated to the first, to get the final hexadecimal number.

Worked Example: 255 to Hexadecimal

StepDivisionQuotientRemainderHex digit
1255 ÷ 161515F
215 ÷ 16015F

Reading the remainders from the last step to the first gives FF. So 255 in decimal equals FF in hexadecimal. As a quick check, FF = (15 × 16) + 15 = 240 + 15 = 255, which confirms the conversion.

Hexadecimal Digit Values

Decimal valueHex digit
0 to 90 to 9
10A
11B
12C
13D
14E
15F

Why Hexadecimal Matters in Computing

Hexadecimal is popular in computing because each hex digit maps exactly onto 4 binary bits (a nibble), and 2 hex digits map onto a full byte (8 bits). This makes hexadecimal a far more compact and readable way to represent binary values than writing out long strings of 1s and 0s. You will see hexadecimal used in web colour codes (such as #1E40AF), memory addresses, MAC addresses, hash values, and error codes.

Related Calculators

Sources: Standard base-16 (hexadecimal) numeral system conventions, as used in computer science and digital electronics.

This calculator handles non-negative whole numbers. Very large numbers are converted using standard JavaScript arithmetic and are accurate for typical use, but extremely large values may lose precision due to floating point limits.

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-02 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.