Domain and Range Calculator

Domain restrictions and numeric range hints for f(x).

FreeNo accountOn your device

Runs in your browser. How to verify

Loading tool…

About this tool

Enter f(x) and get its real domain and range as intervals, with the reason for each restriction. For sqrt(x−1)/(x−3) the domain is [1, 3) ∪ (3, ∞).

How to use

1
Step 1
Type the function, for example sqrt(x-1)/(x-3). You can write f(x) = in front.
2
Step 2
Leave the variable as x, or change it.
3
Step 3
Press Calculate. Read each restriction in the steps, then the domain and range.

How it works

The domain starts as all real numbers and each part of the formula removes values: a square root needs its inside ≥ 0, a logarithm needs it > 0, a denominator cannot be 0, asin and acos need the inside between −1 and 1, and tan, sec, cot and csc exclude the angles where they blow up. Each condition is solved by sign analysis (exactly, for polynomials and rational functions) and the solutions are intersected. The range is then found piece by piece. Because f is continuous on each piece, its values fill the interval between the smallest and largest value reached, counting critical points, closed ends and limits at open ends and at ±∞. For rational functions the critical points are solved exactly; otherwise the values are scanned numerically.

√g needs g ≥ 0      ln g needs g > 0      1/g needs g ≠ 0      asin g needs −1 ≤ g ≤ 1      range = values at critical points, ends and limits

Worked example

A root over a linear factor

Input
sqrt(x-1)/(x-3)
Output
Domain: [1, 3) ∪ (3, ∞) Range: (-∞, ∞)
Walkthrough
The root needs x − 1 ≥ 0, so x ≥ 1, and the denominator needs x ≠ 3. On [1, 3) the function runs from 0 down to −∞; on (3, ∞) it runs from +∞ down toward 0 without reaching it. Together they cover every real number.

Limitations

  • Real-valued functions of one variable only. Complex outputs, such as sqrt of a negative number, count as undefined.
  • Polynomials and rational functions get exact endpoints. For other functions the range comes from a numeric scan, and values that are not simple fractions or multiples of π are shown with ≈. The Endpoints row says which case applies.
  • tan, sec, cot and csc with a linear argument list their excluded points as a formula (x = π/2 + kπ); with a nonlinear argument only the condition is stated.
  • Fractional powers such as x^(1/3) are treated as real only for x ≥ 0; write cbrt(x) to allow negative inputs.
  • A flat stretch that is the lowest or highest value (like max(0, x)) may be reported as not attained; the graph helps to confirm.

Questions

What is the domain of sqrt(x)?
[0, ∞): the inside must be 0 or more.
What is the domain and range of 1/(x^2-4)?
Domain (−∞, −2) ∪ (−2, 2) ∪ (2, ∞); range (−∞, −1/4] ∪ (0, ∞).
What is the range of x^2 - 4x + 7?
[3, ∞). The vertex is at x = 2, where the value is 3.
What is the domain of ln(x^2 - 1)?
(−∞, −1) ∪ (1, ∞), because x² − 1 must be positive.
What is the range of 1/(1 + x^2)?
(0, 1]. The top value 1 is reached at x = 0; 0 is approached but never reached.
What is the domain of asin(2x)?
[−1/2, 1/2], and the range is [−π/2, π/2].
What is the domain of tan(x)?
All real x except x = π/2 + kπ for any integer k; the range is all real numbers.

Features

  • Intervals with reasons
  • Exact for rational functions
  • Honest about numeric endpoints

Related resources

Guides and videos from around the web—opens on YouTube or the publisher’s site.

  • Finding mean, median, and mode

    Khan Academy

    Descriptive stats used across statistics tools.

    Watch on YouTube
  • Solving a consecutive integer problem

    Khan Academy

    Word-problem setup that feeds equation tools.

    Watch on YouTube