Skip to content
MoneyDeck

Asymptote Calculator

Find vertical, horizontal and slant asymptotes and holes of a rational function

Updated · Free, no signup

A polynomial over a polynomial in x. Use ^ for powers and brackets around numerator and denominator.

Vertical asymptotes

x = −1, x = 1

Horizontal asymptote

y = 2

Slant (oblique) asymptote

None

Holes (removable)

None

Domain

All real x except −1, 1

Degree of numerator / denominator

2 / 2

Number of vertical asymptotes

2

  • Equal degrees (2), so the horizontal asymptote is the ratio of leading coefficients: 2 ÷ 1 = 2.
  • Vertical asymptotes where the reduced denominator is zero: x = −1, x = 1.

f(x) and its end-behaviour asymptote

Behaviour near each vertical asymptote

AsymptoteAs x → a⁻As x → a⁺
x = −1+∞−∞
x = 1−∞+∞

About the Asymptote Calculator

This asymptote calculator analyses a rational function — a polynomial divided by a polynomial, such as (2x² + 3)/(x² − 1) or (x³ + 1)/(x² − 4) — and lists all of its asymptotes: the vertical lines x = a where the function shoots off to infinity, the horizontal line y = c it levels off towards, or the slanted line y = mx + b it follows when the numerator’s degree is exactly one more than the denominator’s.

It also detects holes (removable discontinuities), where a factor cancels between numerator and denominator, so x = 1 in (x² − 1)/(x − 1) is reported as a hole at (1, 2) rather than a vertical asymptote. The domain, the y-intercept and the behaviour on each side of every vertical asymptote are shown too, and the graph draws the function with its end-behaviour asymptote.

It is built for algebra 2, precalculus and calculus students sketching graphs of rational functions. You can type the function in any form — even a sum like 1/x − 1/(x + 1) — and it is combined into a single fraction first. Roots of the denominator are found numerically, so irrational asymptotes such as x = ±√2 appear as decimals.

How to use the asymptote calculator

  1. 1Type the rational function, with brackets around the numerator and denominator.
  2. 2Read the vertical asymptotes and any holes.
  3. 3Check the horizontal or slant asymptote and the degree comparison that produced it.
  4. 4Use the table to see whether the graph goes up or down on each side of a vertical asymptote.
  5. 5Look at the graph to confirm the end behaviour.

Formula and method

f(x) = P(x)/Q(x): VA where Q(a) = 0 after cancelling · HA: deg P < deg Q → y = 0; deg P = deg Q → y = pₙ/qₙ · slant: deg P = deg Q + 1 → quotient of P ÷ Q

Vertical asymptotes occur at real zeros of the denominator that do not cancel with the numerator. The calculator finds every real root of Q(x), then counts how many times (x − a) divides Q and P. If the numerator contains the factor at least as many times, the zero cancels and leaves a hole, whose y-value is the limit of the reduced fraction; otherwise x = a is a vertical asymptote.

End behaviour depends on degrees. If the numerator’s degree is lower, f(x) → 0, so y = 0 is horizontal. If the degrees are equal, f(x) approaches the ratio of the leading coefficients. If the numerator is exactly one degree higher, polynomial long division gives f(x) = mx + b + (remainder)/Q(x), and the line y = mx + b is a slant asymptote. A function can have a horizontal or a slant asymptote but never both.

P(x), Q(x)
Numerator and denominator polynomials
pₙ, qₙ
Leading coefficients of P and Q
deg
Degree (highest power) of a polynomial
VA / HA
Vertical / horizontal asymptote

Worked examples

(2x² + 3)/(x² − 1)

The denominator factors as (x − 1)(x + 1) and neither factor cancels, so x = ±1 are vertical asymptotes. The degrees are equal (2 and 2), so the horizontal asymptote is the ratio of leading coefficients, 2/1 = 2.

Slant asymptote: (x² + 1)/(x − 2)

Dividing x² + 1 by x − 2 gives x + 2 with remainder 5, so f(x) = x + 2 + 5/(x − 2). As |x| grows the fraction vanishes, leaving the slant asymptote y = x + 2. The denominator gives the vertical asymptote x = 2.

A hole, not an asymptote: (x² − 1)/(x − 1)

x² − 1 = (x − 1)(x + 1), so the factor x − 1 cancels: f(x) = x + 1 with x ≠ 1. The graph is a straight line with a hole at (1, 2), and it is its own slant asymptote.

Lower degree on top: (3x)/(x² + 4)

x² + 4 is never zero for real x, so there are no vertical asymptotes. The numerator has degree 1 and the denominator degree 2, so f(x) → 0 and y = 0 is the horizontal asymptote.

Frequently asked questions

How do you find vertical asymptotes?+

Factor the numerator and denominator and cancel any common factors. The vertical asymptotes are at the x-values that still make the denominator zero. Values that cancelled give holes instead.

How do you find the horizontal asymptote?+

Compare degrees. If the top degree is smaller, the asymptote is y = 0. If they are equal, it is y = (leading coefficient of top) ÷ (leading coefficient of bottom). If the top degree is larger, there is no horizontal asymptote.

When does a function have a slant asymptote?+

A rational function has a slant (oblique) asymptote when the numerator’s degree is exactly one more than the denominator’s. Divide the polynomials; the quotient mx + b, ignoring the remainder, is the asymptote.

Can a graph cross its horizontal asymptote?+

Yes. Horizontal and slant asymptotes describe behaviour as x → ±∞, so the graph may cross them for moderate x. It can never cross a vertical asymptote, because the function is undefined there.

What is the difference between a hole and a vertical asymptote?+

Both are x-values excluded from the domain. At a hole the factor cancels and the function approaches a finite value, leaving a single missing point. At a vertical asymptote the function grows without bound toward +∞ or −∞.

Related tools