Asymptote calculator
Enter the numerator and denominator of a rational function: get its asymptotes, holes and intercepts.
Polynomials in one letter, up to degree 8: use ^ for powers and brackets for products, for example x^2 - 4x + 1. Fractions like 1/2 and decimals are read exactly.
How do I find a vertical asymptote?
Cancel the factors that the numerator and denominator share, then set the remaining denominator equal to 0. Each real solution is a vertical asymptote. For f(x) = (x − 2)(x + 3) ÷ ((x − 1)(x + 2)(x − 5)) there is nothing to cancel, so the asymptotes are x = −2, x = 1, x = 5 (OpenStax Algebra and Trigonometry 2e, Example 9). If a factor cancels, its zero is a hole, not an asymptote.
How do I find a horizontal asymptote?
Compare the degrees of the numerator and denominator. If the denominator’s degree is larger, the asymptote is y = 0. If the degrees are equal, it is y = the leading coefficient of the numerator ÷ the leading coefficient of the denominator. If the numerator’s degree is larger, there is no horizontal asymptote (OpenStax, section 5.6). For (6x³ − 10x) ÷ (2x³ + 5x²) the degrees are both 3 and the asymptote is y = 3.
When is there a slant asymptote?
When the numerator’s degree is exactly one more than the denominator’s. Divide the polynomials, and the quotient is the line. For (x² − 4x + 1) ÷ (x + 2) the quotient is x − 6 with a remainder of 13, so the slant asymptote is y = x − 6 (OpenStax, Example 7). When the numerator’s degree is two or more above the denominator’s, the graph follows a curve instead of a line: for (x³ + 1) ÷ x it is y = x², and the calculator reports no horizontal or slant asymptote.
What is a hole, and how is it different from a vertical asymptote?
A hole is a single missing point where a common factor of the numerator and denominator cancels. In (x + 3) ÷ (x² − 9) = (x + 3) ÷ ((x − 3)(x + 3)) the factor x + 3 cancels, so there is a hole at x = −3 (at y = −1/6) and a vertical asymptote only at x = 3 (OpenStax, Example 4). The function is undefined at both places, but near a hole the values settle toward a number, while near an asymptote they run off to infinity. Likewise (x − 2) ÷ (x² − 4) has a hole at x = 2, y = 1/4.
Can a graph cross its horizontal asymptote?
Yes. A horizontal asymptote describes what happens far to the left and right, not in the middle, so the curve may cross the line any number of times near the origin and still approach it at the ends. A vertical asymptote, by contrast, can never be crossed, because the function is not defined there. This calculator reports the asymptote; it does not claim the graph stays on one side of it.
Why does the sign go to +∞ on one side and −∞ on the other?
It depends on the multiplicity of the zero in the denominator. An odd multiplicity (a simple factor like x + 2) changes the sign of the function across the asymptote, so one side goes up and the other down. An even multiplicity (a factor like (x + 1)²) keeps the sign, so both sides go the same way. For (x + 2)(x − 3) ÷ ((x + 1)²(x − 2)), at x = −1 the function goes to +∞ on both sides, and at x = 2 it goes to +∞ on the left and −∞ on the right (OpenStax, Example 11 and the text before it).
What about asymptotes of functions that are not rational?
This page is for quotients of polynomials. Other functions have their own asymptotes: y = ln x has x = 0, y = tan x has x = π/2 + kπ, and y = eˣ has y = 0 to the left. They are not covered here. Also, a denominator such as x² + 1 has no real zeros, so it produces no vertical asymptote.
The steps the calculator follows
1. Factor out the greatest common divisor of the numerator and the denominator; its real zeros are the holes. 2. Set the reduced denominator to 0: the real solutions are the vertical asymptotes, and the table shows the sign on each side. 3. Compare degrees of the reduced numerator and denominator to get the horizontal or slant asymptote. 4. Find the x-intercepts, the zeros of the reduced numerator, and the y-intercept f(0) if f is defined at 0. 5. List the domain: all real numbers except the zeros of the original denominator. Using the original denominator in step 5 matters, because holes are excluded from the domain too.
Worked example
Take f(x) = (x − 2)(x + 3) ÷ ((x − 1)(x + 2)(x − 5)) from OpenStax. No factors cancel. The vertical asymptotes are x = −2, x = 1, x = 5. The numerator has degree 2 and the denominator degree 3, so the horizontal asymptote is y = 0. The y-intercept is f(0) = (−2)(3) ÷ ((−1)(2)(−5)) = −3/5, and the x-intercepts are −3 and 2. A shifted reciprocal such as (3x + 7) ÷ (x + 2) has a vertical asymptote at x = −2 and a horizontal one at y = 3, because the leading coefficients are 3 and 1.
Common mistakes
The classic error is reporting every zero of the denominator as an asymptote without checking for a common factor, so a hole gets labeled an asymptote. A second is trusting a graphing calculator’s picture: a hole is a single missing point and, as OpenStax notes, it may not be visible at all depending on the window. A third is dividing leading coefficients when the degrees differ: the ratio rule applies only to equal degrees. A fourth is using the slant-asymptote rule when the degree gap is 2 or more. A fifth is reading a y-intercept off the reduced function when the original is undefined at 0: if x = 0 is a hole, there is no y-intercept at all.
Limits
Polynomials only, with whole-number powers, up to degree 8, and one variable letter. Coefficients may be integers, decimals or fractions, and are read exactly. Real irrational zeros are shown as exact radicals when a quadratic factor produces them and as decimals otherwise. Complex zeros of the denominator are ignored, since they do not create asymptotes on the real graph. The calculator does not draw the graph; for the shape between the asymptotes, use the intercepts and the sign table, and remember that a graph can cross a horizontal or slant asymptote.
Sources: OpenStax, Algebra and Trigonometry 2e, section 5.6 “Rational Functions” (Examples 4 to 11 are automated tests of this calculator). Related: polynomial calculator, synthetic division calculator, partial fractions calculator, inequality solver, equation solver and hyperbola calculator.