Asymptote Calculator (Rational Function Grapher)

Enter the numerator and denominator of a rational function to find its vertical, horizontal and slant asymptotes, any holes, and its intercepts — with a graph that never draws a false line across a pole.

Rational function

Polynomials in x up to degree 4, e.g. (x-1)(x+2) or x^3 - 2x.

How the Asymptote Calculator works

  1. Enter. Numerator: 2x² + 1 · Denominator: x² − 4
  2. Graph. The tool samples the function in your browser and draws it without connecting across breaks.
  3. Read the result. Vertical asymptotes: x = −2, x = 2; Horizontal asymptote: y = 2; Holes: none.
Rational function with dashed vertical asymptotes at x = −2 and x = 2 and a horizontal asymptote at y = 2.
Example: what you enter, the graph the asymptote calculator draws, and the results it reports.

Examples to load

The three asymptote rules

For a rational function f(x) = N(x) / D(x) written in lowest terms, with numerator degree n and denominator degree d:

TypeWhere to lookRule
VerticalZeros of the denominatorx = a for each zero of D that does not cancel with N
HorizontalDegreesn < d → y = 0; n = d → y = ratio of leading coefficients; n > d → none
Slant (oblique)Degreesn = d + 1 → divide; the quotient mx + b is the asymptote
HoleCommon factorsA factor (x − a) that cancels leaves a single missing point at x = a

Worked example

Take f(x) = (x + 3) / (x² + x − 6). Factor the denominator: x² + x − 6 = (x + 3)(x − 2). The factor (x + 3) appears on top and bottom, so it cancels and leaves 1 / (x − 2) for every x except −3.

  1. Hole: the cancelled factor gives a hole at x = −3. Its height comes from the simplified form: 1 / (−3 − 2) = −1/5, so the hole is at (−3, −1/5).
  2. Vertical asymptote: the remaining zero of the denominator gives x = 2.
  3. Horizontal asymptote: the top has degree 1 and the bottom degree 2, so y = 0.
  4. Intercepts: there is no x-intercept (the simplified numerator is 1). The y-intercept is f(0) = 3 / (−6) = −1/2.

Press Hole and asymptote above to see the open circle at (−3, −0.2) and the dashed line x = 2.

Common mistakes

  • Listing a hole as an asymptote. Always cancel common factors first. The calculator keeps the original excluded value even after simplifying, so the hole is still shown.
  • Assuming “degree higher on top” means a slant asymptote. Only a difference of exactly one gives a straight slant line. For x³ / (x − 1) the graph follows a parabola-like curve, so the calculator reports no line asymptote.
  • Trusting a graph with a vertical line drawn through a pole. Many plotters connect the two branches. Here the curve is sampled so that branches are never joined.

For the full explanation with diagrams see vertical, horizontal and slant asymptotes and how to graph a rational function.

Questions

How do I find a vertical asymptote?

Factor the denominator and find where it equals zero. Cancel any factor shared with the numerator first: a cancelled factor gives a hole, and every zero that remains gives a vertical asymptote x = a.

How do I find a horizontal asymptote?

Compare degrees. If the numerator’s degree is smaller, the asymptote is y = 0. If the degrees are equal, it is y = (leading coefficient of the top) ÷ (leading coefficient of the bottom). If the top is one degree larger there is a slant asymptote instead.

Can a graph cross its horizontal asymptote?

Yes. A horizontal asymptote describes what happens as x → ±∞. In the middle of the graph the curve may cross it — for example (x)/(x² + 1) crosses y = 0 at the origin. A graph never crosses a vertical asymptote.

Why does the calculator only accept polynomials up to degree 4?

So that every hole, asymptote and intercept it reports is reliable. For other functions use the main graphing calculator, which plots them correctly but does not claim exact asymptotes.

Guides that use this calculator

Related calculators

Graphing Calculator

Plot several functions, points and inequalities; find roots, intersections and turning points.