Find The Domain Of The Function
Which input values make your function valid and defined?
Paste or type any mathematical function and this tool analyzes it to identify all domain restrictions — division by zero, even roots of negatives, logarithms of non-positives — and returns the domain in interval notation and set-builder form.
—
Send feedback
💡 Share your idea or report a problem
✓ Thanks! We'll take a look.
Learn more
How It Works
The formula, explained simply
Every function implicitly promises to deliver an output for any input you hand it -- but not every input keeps that promise. A square root rejects negative inputs because no real number squares to a negative. A fraction rejects the value that makes its bottom zero because division by zero collapses the number system. A logarithm rejects zero and negatives because its definition requires a positive argument. The domain is simply the complete set of inputs where the function keeps its promise.
The key idea is that restrictions layer. If you have sqrt(x - 3) in the numerator and (x - 9) in the denominator, the sqrt demands x >= 3 and the denominator demands x != 9. Both conditions apply simultaneously. The domain is [3, 9) union (9, +inf) -- not two separate domains, but one combined set where every input satisfies every restriction at once.
Interval notation encodes this precisely. A square bracket means the endpoint is included; a parenthesis means it is excluded. Negative infinity and positive infinity always use parentheses because they are not reachable numbers. The union symbol connects disconnected pieces. Once you read interval notation fluently, the domain tells you instantly which inputs are safe without working through each restriction individually.
When To Use This
Right tool, right situation
Use this tool before graphing any function you are unfamiliar with, before setting up integrals with variable limits, or any time a calculation returns an error and you need to confirm the input was valid. Domain analysis is also the right first step when evaluating composite functions -- the domain of f(g(x)) depends on both the domain of g and the values of g(x) that fall within the domain of f.
This tool is not appropriate as a substitute for a full symbolic algebra system when working with highly nested or piecewise expressions. It handles the most common restriction patterns -- square roots, logarithms, and rational denominators -- but complex compositions with multiple nested functions may require manual verification. If the function involves trigonometric functions, the domain may include periodicity-based restrictions not captured here. Inverse trig functions (arcsin, arccos) have range-based domain restrictions that require separate treatment.
Common Mistakes
Why results sometimes look wrong
The most common mistake is forgetting that a boundary can be both a sqrt lower bound and a denominator zero simultaneously. In sqrt(x - 3) / (x - 3), the sqrt requires x >= 3 but the denominator requires x != 3. Both apply, so x = 3 is excluded despite the bracket suggestion from the sqrt alone. The domain is (3, +inf), not [3, +inf).
A second frequent error is treating the domain of log(x^2) as all real numbers except zero. Because x^2 is always positive for any nonzero x, students correctly identify that x = 0 is excluded but fail to check whether negative x values are valid. Since x^2 > 0 for all x != 0, the domain of log(x^2) is actually all real numbers except zero -- which surprises many people who associate log with only positive inputs.
A third mistake appears when students solve each restriction independently and then union the results instead of intersecting them. Restrictions combine as intersections -- the domain must satisfy all conditions at once. Unioning restrictions gives a set that is too large and includes inputs where the function is undefined.
The Math
Worked examples and deeper derivation
For a linear expression inside a square root -- sqrt(ax + b) -- the restriction ax + b >= 0 gives x >= -b/a when a is positive, or x <= -b/a when a is negative. The boundary point is included because equality produces sqrt(0) = 0, which is valid.
For a logarithm ln(ax + b), the restriction ax + b > 0 gives a strict inequality. The boundary is excluded because ln(0) is undefined. This means logarithm restrictions always produce open intervals at their boundary, while square root restrictions produce closed intervals.
For a fraction with denominator D(x), the restriction is D(x) != 0. Solving D(x) = 0 gives the excluded points. A quadratic denominator like x^2 - 9 factors as (x-3)(x+3), giving two excluded points: x = 3 and x = -3. The domain splits into three intervals around these two points, connected by union. When restrictions combine, the final domain is their intersection -- the set of all x values that satisfy every individual restriction simultaneously.
Expert Unlock
The thing most explanations skip
The implicit domain convention assumes you want all real inputs where the expression makes sense -- but context can impose a narrower domain. A population model defined by P(t) = sqrt(1000 - 5t) has mathematical domain t <= 200, but the applied domain is 0 <= t <= 200 because negative time is meaningless. The formula never tells you this -- you have to impose it. Similarly, when you compose two functions, the chain rule for domains requires that g(x) must land inside the domain of f, not just that x lands inside the domain of g. This inner restriction is almost always forgotten.
Why does my function have restrictions where it looks fine?
Need something this doesn't cover?
Suggest a tool — we'll build it →