YourTools.
简体中文
Back to the catalog
Tools

Calculator

Standard, scientific and programmer calculator: exact decimal arithmetic, trigonometry in degrees or radians, and hexadecimal, octal and binary with bitwise operations.

Loading…

Runs in this page in your browser; nothing is uploaded.

About this tool

An online calculator with standard, scientific and programmer modes. Use it for everyday sums and percentages, trigonometry and logarithms for homework, or hex, binary and bitwise operations while debugging code. Type an expression or use the on-screen keys, and the result appears as you type.

Decimal results are calculated with 50 significant digits and shown with up to 15, so 0.1 + 0.2 gives exactly 0.3. Angles can be in degrees or radians. Programmer mode works with 8- to 64-bit signed or unsigned integers and lets you toggle single bits. The last 20 calculations stay in the history. Everything runs in your browser and nothing is uploaded.

How to use it

  1. Choose “Standard”, “Scientific” or “Programmer”.
  2. Type an expression or use the keys, for example 2^10 + sin(30). The result appears below as you type.
  3. In scientific mode, choose “Degrees” or “Radians”. In programmer mode, pick the input base (HEX, DEC, OCT or BIN), the “Word size” and whether it is “Signed”.
  4. Press Enter or = to put the result in the line and add it to “History”, Esc or C to clear, and “Copy result” to copy it. Select a history entry to reuse it.

Common questions

How does the % key work?

% divides the number before it by 100, so 50% is 0.5 and 200 + 10% is 200.1. To add 10% to 200, type 200 × 1.1 or 200 + 200 × 10%.

Why does ^ give a different answer in programmer mode?

In standard and scientific modes ^ is a power, worked out from the right, so 2^3^2 is 2^9 = 512. In programmer mode ^ means bitwise XOR, the same as xor, so 5 ^ 3 is 6.

What happens when a number does not fit the word size?

Programmer mode wraps around in two’s complement, like a CPU register: with 32-bit signed integers, 0x7FFFFFFF + 1 gives -2147483648. It works with whole numbers only, so 7 / 2 gives 3.

Which functions can I use besides the keys?

You can also type sinh, cosh, tanh, log2, cbrt, floor, ceil and round. log is base 10 and ln is the natural logarithm, and factorials work for whole numbers up to 3000.

Why does 1/3, then = and × 3, give 0.999999999999999?

Pressing = replaces the line with the result as shown, rounded to 15 significant digits, and the next step starts from that. Typed as one expression, 1/3*3 gives 1, because the full 50-digit value is used.