What This Tool Does
This tool evaluates math expressions using mathjs, a full-featured math engine that goes well beyond basic arithmetic, units, matrices, trigonometry, statistics, and complex numbers are all supported in the same expression language. Each expression you run is kept in a scrollable history alongside its result, so you can build up a sequence of calculations like a REPL.
How to Evaluate an Expression
Type an expression into the input bar and press Enter, or click Run. The result appears in the history above, along with how long evaluation took. Click any previous expression in the history to load it back into the input for editing, or press the Up arrow to recall the last one you ran. The Examples panel on the right has ready-to-run expressions across Basic, Trig, Units, Stats, Matrix, and Constants categories.
Units, Matrices, and Complex Numbers
Numbers can carry units directly in the expression, like 2 km + 500 m or 1 inch to cm, and mathjs converts and combines them correctly. Matrices are written with square brackets and semicolons separating rows, [1,2;3,4], and support standard operations like multiplication, determinant, inverse, and transpose. Complex numbers use i, as in 3 + 4i, and trig functions accept degrees directly with a deg suffix, like cos(60 deg), instead of requiring a manual radian conversion.
Precision and Number Formatting
Numeric results are formatted with 14 significant digits of precision, results that are matrices, units, or complex numbers are formatted using their natural mathjs representation rather than being flattened into a plain number. This keeps output readable for both a simple arithmetic result and a more complex structured value like a matrix or a unit-carrying quantity.
Common Uses for a Math Expression Evaluator
Quickly converting between units without hunting for a dedicated converter, checking a matrix calculation like a determinant or inverse by hand, working through trigonometry or statistics without opening a full spreadsheet, and using it as a scratchpad calculator that remembers your recent calculations are all common uses for this tool. It works as an online calculator with units, a mathjs calculator online to evaluate math expression online, a scientific calculator online and matrix calculator online in one, a unit conversion calculator and complex number calculator, and a math repl online or expression parser online for anyone who wants a scratchpad history of past calculations.