Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Domain (excluded values)
x ≠ 2
all real x except where the denominator equals 0
Number of excluded values 1
Excluded value 1 2

What is the domain of a rational function?

A rational function is a ratio of two polynomials, \(f(x) = P(x) / Q(x)\). Because division by zero is undefined, the domain of a rational function is every real number except those that make the denominator \(Q(x)\) equal to zero. This calculator finds those excluded values for you so you can state the domain quickly and correctly.

Number line with two points marked as open circles representing excluded values, with the rest of the line shaded as the domain
The domain is all real numbers except the values where the denominator equals zero (open circles).

How to use this calculator

Choose whether your denominator is linear \((ax + b)\) or quadratic \((ax^2 + bx + c)\), then enter the coefficients. The calculator solves the denominator equal to zero and lists the x-values that must be removed from the domain. The domain is then all real numbers except those values.

The formula explained

For a linear denominator, set \(ax + b = 0\) and solve to get $$\text{Domain: } \left\{\, x \in \mathbb{R} \;\middle|\; \text{a}\,x + \text{b} \neq 0 \,\right\} \;\Rightarrow\; x \neq -\frac{\text{b}}{\text{a}}$$ For a quadratic denominator, use the quadratic formula $$\begin{gathered} \text{Domain: } \left\{\, x \in \mathbb{R} \;\middle|\; \text{a}\,x^{2} + \text{b}\,x + \text{c} \neq 0 \,\right\} \\[1.5em] \Rightarrow\; x \neq \frac{-\text{b} \pm \sqrt{\text{b}^{2} - 4\,\text{a}\,\text{c}}}{2\,\text{a}} \end{gathered}$$ The discriminant \(b^2 - 4ac\) tells you how many real zeros exist: two if it is positive, one (repeated) if it is zero, and none if it is negative. When there are no real zeros, the denominator is never zero and the domain is all real numbers.

Rational function diagram showing a fraction with numerator over denominator and the denominator set not equal to zero
Set the denominator not equal to zero and solve to find the excluded x-values.

Worked example

Consider \(f(x) = 1 / (x^2 - 5x + 6)\). Here \(a = 1\), \(b = -5\), \(c = 6\). The discriminant is $$(-5)^2 - 4(1)(6) = 25 - 24 = 1$$ The roots are $$\frac{5 \pm 1}{2} = 3 \text{ and } 2$$ So the domain is all real numbers except \(x = 2\) and \(x = 3\), written as \(x \neq 2\) and \(x \neq 3\).

FAQ

What if the denominator never equals zero? Then the function is defined everywhere and the domain is all real numbers \((-\infty, \infty)\).

Do the numerator zeros affect the domain? No. Zeros of the numerator give x-intercepts, not domain restrictions. Only the denominator restricts the domain.

What about removable discontinuities (holes)? A factor that cancels still restricts the domain at that point, even though the graph has a hole rather than an asymptote there. This tool uses the denominator as entered.

Last updated: