Safe math evaluator with variables, dependencies, and precision.

Playground

Define variables with math expressions. They can reference each other and will be evaluated in the correct order automatically.

Examples

Values (JSON)

Values are JSON objects/arrays that can be referenced in expressions but do not appear in the evaluation results.

No values defined. Add values to use in your expressions.

Expressions

Expressions are mathematical formulas that will be evaluated and appear in the results.

Results

Click Evaluate to see results

Quick Tips

  • • Variables can reference other variables (e.g., b = a * 2)
  • • Use decimal precision math (e.g., 0.1 + 0.2 = 0.3 exactly!)
  • • Access nested properties with dots (e.g., point.x)
  • • Use $math functions: $math.sqrt(16), $math.PI, etc.
  • • Convert units: $unit.mmToInch(25.4)
  • • Convert angles: $angle.toRad(180)