Tools/calc/evaluate

calc/evaluate

Evaluate a math expression exactly (arithmetic, functions, and constants).

Free / no pricing configured

What it does

Evaluates a mathematical expression and returns the exact result. Supports + - * / // % **, parentheses, the constants pi, e, tau, and functions including sqrt, sin, cos, tan, asin, acos, atan, atan2, log, log2, log10, exp, floor, ceil, abs, round, min, max, gcd, hypot, factorial, degrees, radians.

Primary use cases

  • Precise arithmetic on large or many-digit numbers.
  • Scientific and trigonometric computation.
  • Percentages, ratios, and compound expressions.

Good to know

This is a calculator, not code execution: only numbers, operators, the listed functions, and constants are allowed. Variables, function definitions, and any I/O are rejected. Integers are exact and unbounded (see result_string for very large values). Computed locally.

Parameters

expressionstringrequired

The math expression to evaluate (e.g. "(12 + 5) * 3", "sqrt(2)", "15/100*240").

calc/evaluate — Faro