Find The Domain

Which x values are actually valid inputs for your function?

Enter a function and this tool identifies its domain — the set of all valid input values — expressed in interval notation. It handles square roots, logarithms, rational expressions, and combined restrictions automatically.

Updated July 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Before you can graph a function, differentiate it, or use it in a model, you need to know where it actually works. A function like 1/x looks simple, but it quietly breaks at x = 0 — division by zero produces no real output. The domain is the set of all x values where the function produces a defined, real result. Every other x is simply off the table.

Three core restrictions drive almost every domain problem. First: square roots (and even-index radicals) require their argument to be non-negative, because the square root of a negative number is not a real number. Second: logarithms require a strictly positive argument, because no real exponent applied to a positive base ever produces zero or a negative number. Third: rational expressions — any fraction with x in the denominator — are undefined wherever the denominator equals zero. When multiple restrictions appear in one function, you take the intersection of all valid regions.

The result is expressed in interval notation by default, using square brackets for included endpoints and parentheses for excluded ones. Infinity is always paired with a parenthesis, because you never actually reach infinity. A union symbol (U) joins separate valid intervals when a single hole or a lower bound breaks the domain into disconnected pieces.

When To Use This
Right tool, right situation

Use this tool when you need to graph a function and must identify where it starts, ends, or has holes. Use it before taking derivatives or integrals, since calculus operations inherit domain restrictions from the original function. Use it when setting up word problems that model real quantities — distance, cost, or time — which often have natural lower bounds that must match the mathematical domain.

Also useful when checking whether two functions can be composed. For f(g(x)) to be defined, the range of g must overlap with the domain of f — knowing each function's domain individually is the first step toward finding the domain of the composition.

Do not rely on this tool for piecewise-defined functions where the domain is explicitly stated rather than derived from the expression. Do not use it as a final answer for implicitly defined curves (like circles), parametric equations, or multivariable functions — the domain concept differs in each case. For functions with unusual constructions like floor(), ceiling(), or factorial notation, verify results manually since pattern detection has limits.

Common Mistakes
Why results sometimes look wrong

The most common mistake is forgetting that square roots allow zero. Many students write (a, inf) instead of [a, inf) for a square root domain, excluding the endpoint where the radicand equals zero. Zero is a valid input for a square root — it just produces zero as output. Only strict inequalities (as in logarithms) use open parentheses at the boundary.

A second frequent error is applying the wrong restriction type. Students sometimes look at a function with a fraction and set the numerator equal to zero, not the denominator. Only the denominator drives the rational restriction. The numerator being zero just means the function evaluates to zero — which is perfectly valid output.

The third mistake arises in combined functions: forgetting to intersect all restrictions before stating the domain. Each restriction trims the real number line independently, and the final domain is the overlap, not the union, of valid regions. For sqrt(x - 3) / (x - 7), a student might correctly find x >= 3 for the radical and x != 7 for the denominator, then write both as separate statements rather than combining them into a single interval expression that reflects both conditions at once.

The Math
Worked examples and deeper derivation

For a square root function sqrt(g(x)), set g(x) >= 0 and solve the inequality. The solution set is your domain. For sqrt(x - a), this gives x >= a, or domain [a, inf).

For a logarithmic function log(g(x)) or ln(g(x)), set g(x) > 0 (strict inequality — zero is excluded) and solve for x. For ln(x - a), the domain is x > a, written (a, inf) in interval notation.

For a rational function f(x) = p(x)/q(x), set q(x) = 0 and solve. Every solution is excluded from the domain. For 1/(x - a), the excluded value is x = a, giving domain (-inf, a) U (a, inf).

For combined restrictions, solve each restriction independently. Then intersect the solution sets — only x values satisfying all restrictions simultaneously belong to the domain. For sqrt(x - 3) / (x - 7): restriction 1 gives x >= 3, restriction 2 gives x != 7. Intersecting: [3, inf) minus {7} = [3, 7) U (7, inf).

Graphing a function with a square root and a hole
f(x) = sqrt(x - 3) / (x - 7), Combined restriction, Interval notation
The domain is [3, 7) U (7, inf). Two restrictions apply simultaneously: the square root forces x >= 3, and the denominator cannot equal zero, so x = 7 is excluded. On a graph, the curve starts at x = 3 and has an open hole at x = 7 — neither a vertical asymptote nor a defined point.
Calculus student finding where a derivative is defined
f(x) = ln(x + 4), Logarithm type, Inequality notation
The domain is x > -4. The logarithm argument x + 4 must be strictly positive, so x > -4. When finding derivatives or integrals, this boundary tells you the function only exists to the right of x = -4, which affects limits and continuity checks near that point.
Physics model using 1/x for inverse-square relationships
f(x) = 1/x, Rational type, Set-builder notation
The domain is { x | x < 0 or x > 0 }, written in set-builder form. In a physics context, x might represent distance — and the excluded value x = 0 represents the singularity at the source, which is physically meaningful: the model breaks down at zero separation. The domain result directly tells you where the model is valid.
Expert Unlock
The thing most explanations skip

The natural domain assumes you are working entirely in the real numbers. This breaks down as soon as complex outputs become acceptable — the square root of a negative number is perfectly well-defined in the complex plane, and the domain becomes all real numbers. The tool assumes real-valued output exclusively, which is standard for algebra and calculus but not for complex analysis. Additionally, the intersection-of-restrictions approach assumes independence between restrictions. When a single variable appears inside two interacting restrictions — like sqrt(x) inside a log argument — the algebra becomes nonlinear and the tool flags the ambiguity rather than fabricating a result.

Why does my function exclude those values?

How do I find the domain of a function with a square root?
Set the expression inside the square root greater than or equal to zero, then solve the inequality for x. For example, sqrt(x - 5) requires x - 5 >= 0, so the domain is x >= 5, written in interval notation as [5, inf). The key rule is that square roots of negative real numbers are not defined in the real number system.
What is the domain of a logarithmic function?
The domain of a logarithm is all x values where the argument is strictly greater than zero. For ln(x - 3), you need x - 3 > 0, so x > 3, giving domain (3, inf) in interval notation. Unlike square roots, zero is also excluded — ln(0) is undefined because no finite exponent produces zero when applied to e.
What is the difference between domain and range?
The domain is the set of all valid input values (x) you can plug into a function. The range is the set of all output values (y) the function can produce. For sqrt(x), the domain is [0, inf) — only non-negative inputs are allowed — and the range is also [0, inf) because square roots never produce negative outputs. This tool finds the domain only.

Need something this doesn't cover?

Suggest a tool — we'll build it →