Expression Evaluator

Enter any mathematical expression into the Expression Input field and the Expression Evaluator computes the result using proper order of operations (PEMDAS/BODMAS). Supports arithmetic operators (+, -, *, /, ^), parentheses for grouping, and common math functions like Abs, Sqrt, Sin, Cos, Log, and more. Your evaluated result appears immediately along with the parsed expression.

Enter any math expression using +, -, *, /, ^, parentheses, and functions like Sqrt, Abs, Sin, Cos, Log.

Browse available functions. Copy the syntax into your expression above.

Operators are applied with standard PEMDAS/BODMAS precedence.

How many decimal places to display in the result (0–15).

Results

Result

--

Parsed Expression

--

Expression Type

--

Result is Integer

--

Frequently Asked Questions

What order of operations does the Expression Evaluator use?

The evaluator follows the standard PEMDAS/BODMAS order: Parentheses first, then Exponents (^), then Multiplication and Division (left to right), then Addition and Subtraction (left to right). You can always use parentheses to force a specific evaluation order.

How do I write exponents in an expression?

Use the caret symbol ^ to denote exponentiation. For example, 2^10 evaluates to 1024, and 3^2 evaluates to 9. Exponents are evaluated right-to-left, so 2^3^2 = 2^(3^2) = 2^9 = 512.

Which mathematical functions are supported?

The evaluator supports Abs, Sqrt, Cbrt, Sin, Cos, Tan, Asin, Acos, Atan, Log (natural), Log10, Exp, Floor, Ceil, Round, and Sign. Function names are case-insensitive — you can write sqrt(9) or Sqrt(9). Trig functions expect angles in radians.

Can I use Pi or Euler's number (e) in my expression?

Yes. You can write PI or pi to use the value of π (≈ 3.14159265), and E or e to use Euler's number (≈ 2.71828182). For example, PI * 5^2 calculates the area of a circle with radius 5.

What happens if my expression contains a syntax error?

If the expression cannot be parsed — for example due to unmatched parentheses, an unknown function name, or invalid characters — the evaluator will return an error message explaining what went wrong. Check your brackets and function names, then try again.

Does the evaluator handle division by zero?

Attempting to divide by zero (e.g. 5/0) returns Infinity or -Infinity as defined by IEEE 754 floating-point arithmetic, and the result is flagged accordingly. Similarly, operations like Sqrt(-1) return NaN (Not a Number) since the result is complex.

Is the modulo operator supported?

Yes, use the % symbol for the modulo (remainder) operation. For example, 17 % 5 returns 2, because 17 = 3×5 + 2. Modulo works on both positive and negative numbers.

How many decimal places can the result show?

You can choose between 0 and 15 decimal places using the Decimal Places setting. JavaScript numbers follow IEEE 754 double-precision, which gives about 15–17 significant decimal digits of accuracy.

More Math Tools