Skip to content

Number Bases & Scientific Notation

Notes Calculator accepts numbers written in scientific notation, hexadecimal, binary, and octal. You can also ask any result to render in those formats with an in / as postfix.

Use e (or E) to write a number in scientific notation. The exponent sign is optional.

Notes Calculator
Calculation example
CalculationResult
1.5e61,500,000
2.5E-3 to 4 dp0.0025
5e+35,000
1e1010,000,000,000

Scientific literals participate in arithmetic exactly like any other number:

Notes Calculator
Calculation example
CalculationResult
1.5e6 + 11,500,001
1.5e6 * 23,000,000

Prefix integer literals with 0x (hex), 0b (binary), or 0o (octal). The prefix and digits are case-insensitive.

Notes Calculator
Calculation example
CalculationResult
0xFF255
0xDEADBEEF3,735,928,559
0b101010
0b11111111255
0o1715
0O377255

Mix bases freely in expressions:

Notes Calculator
Calculation example
CalculationResult
0xFF + 1256
0b1010 + 515

Append in <format> or as <format> to a number or expression to choose how the result is displayed. The underlying value is unchanged. Only the rendering is affected.

Notes Calculator
Calculation example
CalculationResult
255 in hexFF
255 in binary11111111
255 in octal377
1234567 as scientific1.234567e6
1234567 as fixed1,234,567

Both in and as are accepted, and as decimal is an alias for as fixed.

The postfix attaches to the whole expression on its left, so parentheses can be used to format an arithmetic result:

Notes Calculator
Calculation example
CalculationResult
(0xFF + 1) in hex100
(0b1010 + 5) in binary1111

in hex, in binary, and in octal require an integer value: with a non-integer the line shows nothing.

A number can also carry its base as a unit, written as a subscript (₂, ₈, ₁₀, ₁₆) or a name such as binary or decimal (see the Unit Reference). Convert it with in:

Notes Calculator
Calculation example
CalculationResult
11₂ in ₁₀3
255₁₀ in ₁₆FF
11 binary in decimal3
255 decimal in hexFF

The default format for numeric results is set in Settings → Number format:

  • Auto: plain decimal for everyday values; switches to scientific for very large or very small numbers. (Default.)
  • Scientific: every number renders in scientific notation.
  • Fixed: every number renders as a plain decimal, never in scientific notation.

A per-line as scientific / as fixed postfix always overrides the global setting.

Very small numbers keep their significant digits instead of rounding down to 0.00:

Notes Calculator
Calculation example
CalculationResult
0.00010.0001
1/30000.00033
0.0000123451.23e-5
1 µg in mg0.001 mg