Skip to main content
Home/Math Evaluator

Math Expression Evaluator

Evaluate expressions with variables, functions (sin, cos, sqrt, log), constants (PI, E), hex, binary, factorials, and more.

// Basic arithmetic
2 + 3 * 4= 14
(10 - 2) ** 3= 512
Β 
// Variables
radius = 5radius = 5
area = PI * radius ^ 2area = 78.5398163397
Β 
// Functions
sqrt(144)= 12
sin(PI / 4)= 0.707106781187
log2(1024)= 10
Β 
// Hex & binary
0xFF + 0b1010= 265
5!= 120

Variables

radius = 5area = 78.5398163397ans = 120

Quick Reference

Operators

+ - * / arithmetic
** ^ power
% modulo
! factorial

Functions

sin cos tan
sqrt cbrt abs
log log2 log10
pow(a,b) min max

Constants

PI = 3.141593
E = 2.718282
TAU = 6.283185
PHI = 1.618034

Formats

0xFF hexadecimal
0b1010 binary
1.5e3 scientific
// # comments

How to use the Math Evaluator

  1. 1

    Type expressions

    Enter math expressions, one per line. Results update in real-time.

  2. 2

    Use variables

    Assign with x = 5, then reference in later lines: x * 2

  3. 3

    Use functions

    Call sin(x), sqrt(x), pow(a,b), etc. Use PI, E constants.

Frequently Asked Questions

Last updated: