Expression grapher
Type any function of x and see it graphed, evaluated and typeset.
Results
Graph
Drag to pan, scroll or pinch to zoom, or use the + / − / ⟲ buttons. The graph can also be reached with the keyboard: Tab to it, then use the arrow keys and + / −.
How it works
The expression is parsed by a small, safe grammar (no code is ever executed) into a tree of operations, which is then evaluated at each x-value to draw the curve, and separately at the x you choose below.
- Operators: + − * / ^ for addition, subtraction, multiplication, division and powers; use parentheses to group.
- Functions: sin cos tan asin acos atan sqrt log ln exp abs — each needs parentheses, e.g. sin(x).
- Constants: pi and e. The only variable is x.
Common mistakes
- Forgetting implicit multiplication isn't always assumed the same way across calculators - writing "2x" or "2(x+1)" may need an explicit × depending on the parser, so an unexpected error often means a missing multiplication sign, not a typo elsewhere.
- Mixing up operator precedence, especially with nested exponents and unary minus - "-x^2" and "(-x)^2" are not the same expression, and relying on mental math instead of parentheses to resolve ambiguity is a common source of an unexpected sign.
- Evaluating at a point where the expression is undefined (division by zero, a negative number inside an even root, log of zero or a negative number) and expecting a normal numeric result - these are genuine mathematical gaps in the function's domain, not calculator errors.
Related calculators
Binomial probability calculator
The probability of exactly k successes in n independent trials, each with the same success probability.
Circle calculator
Diameter, circumference and area of a circle from its radius.
Combinations and permutations calculator
How many ways to arrange or choose r items from n, with and without order mattering.
Conditional probability calculator
P(A given B) and P(B given A) from P(A), P(B) and P(A and B), with an independence check.