Choose a common function type, or enter your own expression, to find its domain and range instantly.
Use x as the variable. Supports + - * / ^, sqrt(), abs(), sin() cos() tan(), ln() log(), and pi. Example: 1/(x-3), x^2-4.
The domain of a function is every input value (x) that produces a valid, real-number output. The range is every output value (y) the function can actually produce. Together, they describe exactly what a function can accept and what it can return — the foundation for graphing, solving equations, and understanding a function's behavior.
Start by looking for the three things that commonly restrict a domain: division by zero, square roots (or any even root) of a negative number, and logarithms of zero or a negative number. If none of these appear, the domain is usually all real numbers.
Set the expression inside the root to be greater than or equal to zero and solve for x.
Set the denominator equal to zero, solve for x, and exclude that value.
Set the expression inside the log to be strictly greater than zero and solve for x.
The easiest approach for most everyday functions is to think about the minimum and maximum output the function can produce. For a quadratic, that's the vertex. For a square root or absolute value, it's the value added or subtracted at the end. For a rational function, look for a horizontal asymptote — a y-value the function gets close to but never reaches.
A parabola's range depends only on which way it opens and where its vertex sits.
| Function type | Domain | Range |
|---|---|---|
| Linear: mx + b | All real numbers | All real numbers (unless m = 0) |
| Quadratic: a(x−h)²+k | All real numbers | y ≥ k (opens up) or y ≤ k (opens down) |
| Square root: √(x−h)+k | x ≥ h | y ≥ k |
| Rational: 1/(x−h)+k | All reals except x = h | All reals except y = k |
| Absolute value: a|x−h|+k | All real numbers | y ≥ k (a>0) or y ≤ k (a<0) |
| Exponential: a·bx+k | All real numbers | y > k (a>0) or y < k (a<0) |
| Logarithm: logb(x−h)+k | x > h | All real numbers |
The domain of a function is the complete set of input values (x-values) for which the function produces a valid, real-number output. For example, the domain of f(x) = 1/x excludes x = 0, because division by zero is undefined.
The range of a function is the complete set of output values (y-values) the function can actually produce. For example, the range of f(x) = x squared is y is greater than or equal to 0, because squaring any real number never produces a negative result.
Set the expression inside the square root to be greater than or equal to zero and solve for x, since square roots of negative numbers are not real numbers. For example, for f(x) = square root of (x minus 2), the domain is x is greater than or equal to 2.
Set the denominator equal to zero, solve for x, and exclude those values from the domain, since division by zero is undefined. For example, for f(x) = 1/(x-3), the domain is all real numbers except x = 3.
A quadratic function's domain is always all real numbers, since you can square and combine any input. The range depends on the direction it opens: if the parabola opens upward, the range is y is greater than or equal to the minimum (vertex) value; if it opens downward, the range is y is less than or equal to the maximum (vertex) value.