Hexadecimal Calculator

Hexadecimal, or base 16, is the numbering system used almost everywhere in computing: memory addresses, colour codes, machine instructions, network identifiers and debugging output all appear in hex. The digits run from 0 to 9 and then A to F, where A represents 10, B is 11, and so on up to F which is 15. Because 16 is a power of 2, each hex digit maps exactly to four binary bits, making the system far more compact and readable than raw binary while remaining unambiguous. Doing arithmetic directly in hex is a skill that programmers, embedded systems engineers and computer science students use regularly, but carrying and borrowing across the A-to-F range is error-prone by hand. This calculator lets you enter two hexadecimal values and choose an operation: addition, subtraction or multiplication. It returns the result in hexadecimal, converts it to decimal and binary, and shows the operands in all three bases for verification. Unlike a simple hex-to-decimal converter, this tool performs the arithmetic itself. Upper and lower case are both accepted for the hex digits A through F. Results are signed integers, so a subtraction that produces a negative value will display with a minus sign. Enter your two hex values and choose the operation to see the result instantly. The worked example below uses the defaults already filled in.

Conservation Amendment Bill
C2
result in hexadecimal
Decimal result194
Binary result11000010
A in decimal163
B in decimal31

How it works

The calculator converts each hex input to a decimal integer using JavaScript's built-in parseInt with base 16. It then applies the selected arithmetic operation (addition, subtraction or multiplication) in decimal, and converts the result back to hex using the toString(16) method, with the output forced to upper case. The decimal result is shown as-is, and the binary equivalent is produced via toString(2). Both input values are also shown in decimal so you can verify the conversion at a glance. If either input contains characters outside 0-9 and A-F, the calculator shows an error rather than producing a misleading result.

Worked example

First value A3 is 10 times 16 plus 3, which equals 163 in decimal. Second value 1F is 1 times 16 plus 15, which equals 31 in decimal. Adding: 163 plus 31 equals 194 in decimal. Converting 194 back to hex: 194 divided by 16 is 12 remainder 2, and 12 in hex is C. So the result is C2 in hexadecimal. In binary, 194 is 11000010. These match the defaults pre-filled above.

Related calculators

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