Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

Domain Calculator

How to use
  1. Type the function in the f(x)f(x) box, for example x−3\sqrt{x - 3}, 1x−2\dfrac{1}{x - 2} or ln⁡(x)\ln(x). Learn more about entering the function
  2. Read the domain under Domain, written in interval notation. Learn more about reading the answer
  3. Look at the graph: the blue stretch along the xx-axis is the domain. A filled end belongs to it, a hollow end does not, and a dashed red line marks an xx that is left out.
  4. Read How it was found for the reason behind every end point and every xx that is left out.

Domain
Domain
[3, ∞)\displaystyle [3,\ \infty)
How it was found

f(x)=x−3f(x) = \sqrt{x-3} is defined wherever every part of its formula is: no division by zero, no even root of a negative number, no logarithm of zero or a negative number.

To the left of x=3x = 3 the formula has no real value; the domain starts at 33.

Checked on −10≤x≤10-10 \leq x \leq 10; a break further out would not be seen.

f(x)=x−3f\left(x\right)=\sqrt{x-3}


Finding the domain

DemoFind the domain
Step 0 of 4
Type the function in the f(x)f(x) box. The calculator works out the domain as you type, writes it under Domain, and paints it in blue along the xx-axis of the graph.

You can use powers (x2x^2), roots (x\sqrt{x} as sqrt(x), cube roots as cbrt(x)), fractions with a slash, ln⁡\ln, log⁡\log, exe^x, the trigonometric functions and their inverses, and ∣x∣|x| as abs(x). Brackets group as usual: 1/(x - 2) is 1x−2\dfrac{1}{x - 2}, while 1/x - 2 is 1x−2\dfrac{1}{x} - 2.

The answer follows every change, so you can alter one number in the formula and watch the blue stretch move.

Reading the answer

DemoEnds, holes and repeats
Step 0 of 4
    The Domain box gives the set of allowed inputs in interval notation:

  • [3, ∞)[3,\ \infty) means every xx from 33 on, with 33 itself included.
  • (0, ∞)(0,\ \infty) means every xx greater than 00; the round bracket says 00 is left out.
  • R∖{2}\mathbb{R} \setminus \{2\} means every real number except 22.
  • R\mathbb{R} means every real number.

  • On the graph the same set is the blue stretch on the xx-axis. A filled end is in the domain, a hollow end is not. A dashed red vertical line stands at an xx where the formula grows without bound.

    How it was found names the cause of each restriction: where the formula stops having a real value, where it divides by zero, and whether a missing point is an asymptote or a hole.

What the domain of a function is

The domain of a function is the set of all inputs for which the function gives a value. For a function given by a formula and nothing else, it is taken to be every real number xx for which the formula can be worked out as a real number. This is sometimes called the natural domain.

For f(x)=x−1f(x) = \sqrt{x - 1} the formula works exactly when x−1≥0x - 1 \geq 0, so the domain is [1, ∞)[1,\ \infty). At x=1x = 1 it gives 0=0\sqrt{0} = 0; at x=0x = 0 it would need −1\sqrt{-1}, which is not a real number.

The domain is about inputs only. Which outputs come out is a different question, answered by the range.
The domain of x−1\sqrt{x - 1} is [1, ∞)[1,\ \infty): the blue stretch of the xx-axis.

The three things that restrict a domain

    Among the functions met in school, only three operations can fail:

  • Division by zero. A fraction has no value where its denominator is 00. For 1x−2\dfrac{1}{x - 2}, leave out x=2x = 2.
  • An even root of a negative number. u\sqrt{u} needs u≥0u \geq 0. For x−3\sqrt{x - 3}, solve x−3≥0x - 3 \geq 0 to get x≥3x \geq 3.
  • A logarithm of zero or a negative number. ln⁡(u)\ln(u) needs u>0u > 0, strictly. For ln⁡(x)\ln(x), the domain is x>0x > 0.

  • Everything else is safe: polynomials, exe^x, sin⁡(x)\sin(x), cos⁡(x)\cos(x), ∣x∣|x| and odd roots such as x3\sqrt[3]{x} accept every real number.

    To find a domain by hand, look for these three in the formula, write the condition each one needs, and keep the xx that satisfy all the conditions at once.
1x−2\frac{1}{x - 2}: every xx except 22.
ln⁡(x)\ln(x): only x>0x > 0, with a hollow end at 00.

Several conditions at once

When a formula contains more than one risky operation, every condition must hold together.

Take f(x)=x−1x−3f(x) = \dfrac{\sqrt{x - 1}}{x - 3}. The root needs x≥1x \geq 1 and the denominator needs x≠3x \neq 3. Together: [1, ∞)[1,\ \infty) with 33 taken out, which is [1, 3)∪(3, ∞)[1,\ 3) \cup (3,\ \infty).

Take f(x)=4−x2f(x) = \sqrt{4 - x^2}. The condition 4−x2≥04 - x^2 \geq 0 means x2≤4x^2 \leq 4, so −2≤x≤2-2 \leq x \leq 2. Here one condition gives two ends, and the domain is the closed interval [−2, 2][-2,\ 2].

Take f(x)=ln⁡(4−x2)f(x) = \ln(4 - x^2). The same expression now has to be strictly positive, so the ends are left out: (−2, 2)(-2,\ 2).
4−x2\sqrt{4 - x^2} is defined from −2-2 to 22, ends included.

Holes and vertical asymptotes

A number left out of the domain shows on the graph in one of two ways.

At a vertical asymptote the values grow without bound. 1x−2\dfrac{1}{x - 2} shoots down on the left of x=2x = 2 and up on the right.

At a hole the graph simply misses one point. x2−1x−1\dfrac{x^2 - 1}{x - 1} gives 00\dfrac{0}{0} at x=1x = 1. Away from 11 the fraction equals x+1x + 1, so the graph is a straight line with a single point missing at (1, 2)(1,\ 2).

Cancelling does not give the point back. The function x2−1x−1\dfrac{x^2 - 1}{x - 1} and the function x+1x + 1 agree everywhere except at x=1x = 1, where the first has no value. The domain is decided by the formula as written, before any simplifying.
x2−1x−1\frac{x^2 - 1}{x - 1} is the line x+1x + 1 with one point missing.

Domains with infinitely many gaps

Some functions leave out infinitely many numbers. tan⁡(x)=sin⁡(x)cos⁡(x)\tan(x) = \dfrac{\sin(x)}{\cos(x)} has no value wherever cos⁡(x)=0\cos(x) = 0, which happens at π2\dfrac{\pi}{2}, 3π2\dfrac{3\pi}{2}, −π2-\dfrac{\pi}{2} and so on, one every π\pi.

The calculator recognises a regular pattern like this and writes it once: x=π2+kπx = \dfrac{\pi}{2} + k\pi for every whole number kk. The graph shows the asymptotes that fit in the picture.

The same happens for sec⁡(x)\sec(x), for cot⁡(x)\cot(x) and csc⁡(x)\csc(x) (left out at the multiples of π\pi), and for fractions such as 1sin⁡(x)\dfrac{1}{\sin(x)}.

What the calculator checks

The calculator studies the formula numerically for xx between −10-10 and 1010. Every break inside that stretch is found and classified; a break further out, such as the one of 1x−50\dfrac{1}{x - 50}, is not seen, and the answer says where it looked.

End points and left-out numbers that are whole numbers, simple fractions or simple multiples of π\pi are written exactly. Others are given as decimals.

A domain can also be narrowed by the problem itself: a length cannot be negative, a number of people must be a whole number. Those limits come from the setting, not from the formula, so the calculator does not know about them.

Common mistakes

  • Simplifying first. x2−1x−1\dfrac{x^2 - 1}{x - 1} is not defined at x=1x = 1 even though it simplifies to x+1x + 1.
  • Using ≥\geq for a logarithm. ln⁡(x)\ln(x) needs x>0x > 0; ln⁡(0)\ln(0) has no value.
  • Using >> for a square root. 0=0\sqrt{0} = 0 is fine, so x−3\sqrt{x - 3} includes x=3x = 3.
  • Restricting odd roots. x3\sqrt[3]{x} accepts negative numbers; only even roots do not.
  • Forgetting the root under a fraction bar. In 1x\dfrac{1}{\sqrt{x}} the root needs x≥0x \geq 0 and the division needs x≠0\sqrt{x} \neq 0, so the domain is x>0x > 0.
  • Mixing up domain and range. The domain is read along the xx-axis, the range along the yy-axis.