Expression calculator

Calculate expressions with exact fractions.

Processed only in this browser

Type an expression or use the keypad to see its exact fraction and decimal value.

Inputs and settings
Examples

+ − × ÷, powers ^, remainder %, and parentheses. Decimals and scientific notation are supported.

More options

Inputs and results are processed in this tab. Reloading or closing clears them; files you choose to save remain on your device.

How to use this tool

  1. Type an expression or enter numbers and operators with the keypad.
  2. Open More options to choose the number of decimal places.
  3. Check the exact fraction alongside the decimal, then copy or save the result.

Add two exact decimal inputs

Input and settings
0.1 + 0.2
Result
Decimal 0.3; exact fraction 3/10

The decimal operands are not first rounded into binary floating-point numbers.

Read the order of operations

Parentheses run first, and powers take precedence over multiplication and division. The expression -2^2 means -(2^2), giving -4, while (-2)^2 gives 4. Chained powers associate to the right, so 2^3^2 is 512.

The % operator is a remainder operation, not a percentage button. Use the percentage calculator for discounts or part-to-whole ratios so that the intended base amount stays explicit.

Exact results and display limits

Numerators and denominators remain integers. A nonterminating decimal is rounded at your selected precision and marked with ≈. Copy the fraction when passing an exact value into a later calculation.

Expressions are bounded to 512 characters and integer exponents from -20 to 20. Excessive nesting and result sizes are rejected. Variables, functions, currencies and physical units are not parsed, and the input is never executed as program code.

Common questions

Why does the decimal show ≈?

The selected decimal precision cannot represent the full value, so the display was rounded. The exact fraction below remains unchanged.

Is the expression saved?

It exists only in this tab’s memory and disappears on reload. Saving creates a local result file only when you choose the save action.

Standards and references