Precalculus

Domain & Range Calculator

Enter a function of x. The calculator walks the expression to collect domain restrictions — zeros of any denominator, sign constraints inside square roots and logarithms — and reports the resulting set. The range is given for the common patterns (polynomial, sqrt, exp, ln, sin/cos) and reported as 'not determined' for trickier cases.

Domain & Range Calculator

Find domain restrictions and the range of a function of x.

Try:
Answerdomain: denominator ≠ 0: x ≠ 1; range — not determined
  1. Functionf(x) = 1/(x − 1)
  2. Domaindomain restrictions: • denominator ≠ 0: x ≠ 1
  3. Function rangeCould not determine a simple closed form for the range. Use graphing or numerical methods.

Restrictions found structurally, not guessed

The domain of a function is the set of inputs it accepts; the range is the set of outputs it produces. Domain questions are answerable by inspection — find every operation that would break, and exclude the inputs that break it. Range questions are much harder: they ask what the function does across its whole domain, not what it refuses to do at one point.

This calculator reflects that asymmetry honestly. It reports the domain by walking the expression and collecting every restriction it finds, and reports the range only for the patterns where a closed form genuinely exists.

The tool parses your function into a tree and visits every node, so a restriction buried inside a nested expression is caught as reliably as one at the top level. That is the tedious part of domain work, and where a hand-worked answer usually loses a condition.

Restrictions are reported individually rather than merged into one interval. A denominator inside a square root produces two separate conditions, and seeing them listed makes clear which operation each came from.

How to use this calculator

  1. Type the function in terms of x Standard notation: ^ for powers, * for multiplication, and named functions with brackets — sqrt(x), ln(x), asin(x). The expression is simplified before analysis, so a reducible input is tidied first.
  2. Read the domain restrictions as a list Each bullet is one condition from one operation. An empty list means the domain is all real numbers, reported explicitly rather than left blank.
  3. Read the range, or the note that it was not determined A closed form is given where the function matches a recognised pattern. Otherwise the tool says so plainly instead of guessing — a real answer, not a failure.

How the restrictions are collected

Analysis is a recursive walk over the parsed expression. Sums, products, powers and negations impose no conditions of their own, so the walk descends into their parts; the conditions come from divisions and named functions, each recorded where it is found.

For a division, the denominator is converted to a coefficient list where possible and its real roots are solved for, giving an explicit list of excluded x-values. A denominator with no real roots imposes no restriction at all, and is correctly reported as such. When the denominator is not a polynomial the tool reports the symbolic condition rather than an empty result.

Named functions contribute their own conditions. A square root requires its argument to be non-negative, and a logarithm requires its argument to be strictly positive; where that argument is linear the condition is solved into an inequality on x, with the direction determined by the sign of the slope. Inverse sine and cosine constrain their argument to the interval from −1 to 1, and tangent is flagged as undefined wherever its cosine vanishes.

The range is handled separately and much more conservatively. A constant gives a single value, a linear or odd-degree polynomial gives all the reals, and a quadratic gives a half-line bounded by its vertex value. Beyond that only the standard shapes are recognised: square root, exponential, logarithm, sine, cosine and arctangent. Anything else returns an explicit note that no simple closed form was found.

What each input means

f(x) Function — form field “Function f(x)”
The expression to analyse, in terms of x. Its structure determines the analysis, so brackets matter: sqrt(x) + 1 and sqrt(x + 1) produce different restrictions.
D Domain
The set of admissible inputs, reported as a list of conditions rather than an interval. An empty list means all real numbers.
R Range
The set of outputs, given only for recognised patterns. Reported as not determined otherwise.

Worked examples

Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.

A rational function with one excluded point

Analyse 1/(x − 1). The only thing that can go wrong is the denominator vanishing, and it does so at exactly one point.

Inputs Function f(x) = 1/(x - 1)

  1. Function f(x) = 1/(x − 1)
  2. Domain domain restrictions: • denominator ≠ 0: x ≠ 1
  3. Function range Could not determine a simple closed form for the range. Use graphing or numerical methods.

Result domain: denominator ≠ 0: x ≠ 1; range — not determined

The denominator is linear, so its single root is found exactly and reported as an excluded value. The domain is every real number except that one point — a puncture in the line rather than an interval restriction.

The range is reported as not determined. That is the correct answer here: the function takes every value except zero, which is not one of the closed forms the tool recognises, so it declines to state one rather than approximating.

A square root, where the restriction is an inequality

Analyse sqrt(x − 2). The radicand is linear, so the non-negativity condition can be solved into a bound on x directly.

Inputs Function f(x) = sqrt(x - 2)

  1. Function f(x) = sqrt(x − 2)
  2. Domain domain restrictions: • √ argument ≥ 0: x ≥ 2
  3. Function range range = [0, +∞)

Result domain: √ argument ≥ 0: x ≥ 2; range = [0, +∞)

The condition is reported as x ≥ 2, not as the raw inequality x − 2 ≥ 0. Because the argument is linear the tool solves it, and the direction of the inequality follows the sign of the slope — a negative slope would flip it.

Here a range is given: the square root of a non-negative quantity is non-negative, so the outputs run from zero upwards. This is one of the recognised shapes, which is why a closed form appears where the rational example got none.

Reading the result

Reading a list of restrictions

The conditions are simultaneous: the domain is the set of x satisfying all of them at once. Conditions from different operations are not alternatives — a value must clear every bullet to be admissible.

What “not determined” means

It means no closed form was recognised, not that the range is empty. Every function has a range; the tool restricts itself to cases it can state exactly and leaves the rest to graphing. The function-feature analyser reports an observed range over an interval, which is a useful complement.

When you would use this

Checking domain work before graphing

Knowing where a function is undefined tells you where to expect vertical asymptotes and gaps. It is the natural first step before any sketch.

Verifying a composed or inverted function

Composition and inversion both change the domain in ways that are easy to miss. Analysing the result here catches a restriction inherited from the inner function that the final expression no longer shows.

Assumptions and limitations

What this calculator assumes

  • The function is real-valued and written in x as its only variable.
  • Denominators are solved exactly only when they are polynomial; other denominators are reported as an unsolved symbolic condition.
  • Square-root and logarithm arguments are solved into inequalities on x only when they are linear.
  • The range is reported only for the recognised patterns listed in the method, and is otherwise explicitly not determined.

Where it stops being the right tool

  • Restrictions are collected, not combined: overlapping conditions are listed side by side rather than intersected.
  • Boundary values come from polynomial roots of low degree; a higher-degree restriction is left as a symbolic inequality.
  • The range is unavailable for most non-standard functions, including every rational function.

Common mistakes

Simplifying away a restriction before analysing

Why it happens. An expression such as (x² − 1)/(x − 1) reduces to x + 1, which has no restriction at all. The reduction is valid everywhere except at the removed point, where the original was undefined.

How to avoid it. Analyse the function as originally written. A hole is still a hole even when the simplified form does not show it.

Reading “not determined” as an error

Why it happens. Every other line of the output is a definite result, so a sentence of prose in place of a range looks like a failure to compute.

How to avoid it. Treat it as a deliberate refusal to overstate. Where the range genuinely matters, sketch the function or use the feature analyser over an interval.

Missing a restriction from a nested operation

Why it happens. Working by hand, the outermost operation gets checked. A logarithm inside a square root, or a denominator inside either, is easy to walk past.

How to avoid it. Compare your conditions against the reported list. Each bullet names the operation it came from, so an extra one identifies exactly what was missed.

Frequently asked questions

Which restrictions does it detect?

Denominators must not vanish, so their real roots are excluded; square-root arguments must be non-negative; logarithm arguments must be strictly positive; inverse sine and cosine arguments must lie between −1 and 1; and tangent is flagged wherever its cosine is zero.

Why does the range sometimes say “not determined”?

Because the range of an arbitrary function has no general algorithm. A closed form is reported for constants, linear and odd-degree polynomials, quadratics, and the standard sqrt, exp, log, sine, cosine and arctangent shapes. Anything else is declared undetermined rather than guessed at.

How exact are the boundary values?

Exact where they come from polynomial roots of degree one or two, which covers almost every restriction seen in practice. For higher-degree conditions the symbolic inequality is reported instead of numeric roots.

Does it handle piecewise functions?

No. A single expression in x is analysed as one object, so a function defined case by case has to be entered and analysed one piece at a time.