Asymptote Calculator - Vertical, Horizontal & Slant

Type it plainly: x^2 - 4, 3x^3 + 2x, or a factored form like (x-1)(x+3).

Paste a whole fraction into the first box and it will split itself in two.

Function

f(x) = (x² − 4) / (x² − 5x + 6)

Vertical asymptotes

  • x = 3

Roots of D(x) that the numerator does not cancel.

Horizontal asymptote

y = 1

The quotient of N ÷ D is a constant.

Holes

  • (2, −4)

Shared roots cancel, leaving a single missing point.

Graph with every asymptote drawn in

−5−4−3−2−10123456−6−4−202468
f(x) vertical asymptote horizontal asymptote hole

Which degree rule fired

deg N < deg DHorizontal asymptote y = 0
deg N = deg DHorizontal asymptote y = leading N ÷ leading D
deg N = deg D + 1Slant asymptote — the quotient of the division
deg N > deg D + 1Neither — the curve follows a higher-degree quotient

deg N (2) = deg D (2)Horizontal asymptote at y = 1

Domain

All real x except 2, 3

Intercepts

x: −2  ·  y: −2/3

Which way the curve runs at each vertical asymptote

AsymptoteOrderFrom the leftFrom the right
x = 31−∞+∞

An odd order flips the sign across the asymptote; an even order sends both sides the same way.

How to Use This Calculator

  1. Type the top of the fraction into Numerator N(x) and the bottom into Denominator D(x). Expanded and factored forms both work, so x^2 - 5x + 6 and (x-2)(x-3) give the same answer.
  2. Got the whole function on one line? Paste it into the numerator box and click away — a slash outside any bracket splits it into the two fields for you.
  3. Read the three cards. Vertical asymptotes are the roots the numerator failed to cancel, the middle card gives the horizontal or slant asymptote, and Holes lists the roots that cancelled instead.
  4. Check Which degree rule fired — the highlighted row is the one your function triggered, and it is the line to write down in an exam.
  5. Open Long division when the answer is a slant asymptote. The table shows every subtraction, and the box underneath rewrites f(x) as quotient + remainder ÷ D(x).
  6. Use Auto fit for a window that already contains every feature, or lock the x-range to ±5, ±10 or ±20 to match the axes on your worksheet.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Asymptote Calculator: The Degree Rules That Decide Every Horizontal and Slant Asymptote

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Asymptote calculator graphic: a rational curve approaching a dashed vertical asymptote and a dashed horizontal asymptote without touching

An asymptote calculator has to answer three unrelated questions, and only one of them involves the denominator’s roots. Vertical asymptotes come from where the function breaks. Horizontal and slant asymptotes come from a degree comparison that never looks at the roots at all. And holes are the case where the first test quietly lies to you.

Get those three separated and rational functions stop being fiddly. Below is the whole decision procedure, the four degree cases with numbers attached, and the one fact that makes horizontal and slant asymptotes the same calculation instead of two rules to memorise.

Three Questions the Word “Asymptote” Hides

Students lose marks here because “find the asymptotes” sounds like one task. It is three, and each one uses a different piece of the function:

FeatureWhat you look atWhat you ignoreCan the curve touch it?
VerticalRoots of D(x) after cancellingDegrees entirelyNever
Horizontaldeg N vs deg D, leading coefficientsEvery rootYes, up to deg D − 1 times
SlantThe quotient of N ÷ DEvery rootYes, up to deg D − 1 times
HoleRoots shared by N and DDegrees entirelyIt is a missing point, not a line

Notice the middle column. The vertical test cares only about roots; the horizontal and slant tests care only about degrees. Running one test and reporting the other’s answer is the single most common error on this topic. If you want the full picture of where a function is defined in the first place, the domain and range calculator handles that side.

The Degree Comparison, in Four Cases

For f(x) = N(x)/D(x), compare the degree of the top to the degree of the bottom. There are exactly four outcomes, and every rational function you will ever be handed falls into one of them.

CaseResultExampleAnswer
deg N < deg DHorizontal at y = 0(2x + 5)/(x² − x − 6)y = 0
deg N = deg DHorizontal at the ratio of leading coefficients(3x² − 2x + 1)/(x² − 4)y = 3
deg N = deg D + 1Slant (oblique), from long division(x² + 1)/(x − 1)y = x + 1
deg N > deg D + 1Neither one exists(x³ + 1)/(x − 2)curve follows y = x² + 2x + 4

The second row is where the arithmetic slips happen. It is the ratio of the leading coefficients — 3 over 1, giving y = 3 — not the ratio of the constants, and not 3 over −4. The −2x and the −4 are irrelevant to end behaviour: at x = 1,000 the −2x is 0.067% of the numerator and the −4 is 0.0004% of the denominator, so f(1,000) = 2.998013 — already within 0.002 of 3.

The fourth row surprises people. A function can be perfectly well behaved and simply have no horizontal or slant asymptote, because the thing it approaches is a parabola. Textbooks call that a curvilinear or polynomial asymptote, and it is worth stating in an answer rather than writing “none” and stopping.

Horizontal and Slant Asymptotes Come Out of One Division

Here is the fact that collapses four rules into one. Divide N by D and write the result as

N(x) / D(x) = Q(x) + R(x) / D(x)

The remainder R always has a lower degree than D, so R(x)/D(x) → 0 as x runs off to ±∞. Whatever is left is Q(x), and that is the asymptote — every single time. If Q is a constant you call it horizontal. If Q is linear you call it slant. If Q is a parabola you say there is no line to follow. Same computation, three different names.

Take f(x) = (x² + 1)/(x − 1). Dividing gives x + 1 with a remainder of 2, so

f(x) = x + 1 + 2/(x − 1)

At x = 101 the correction term is 2/100 = 0.02, so f(101) = 102.02 against an asymptote value of 102. At x = 10,001 the gap is 0.0002. The curve never lands on y = x + 1, but it closes in on it at a rate of roughly 2/x. That last number is genuinely useful: it tells you how far out you have to plot before the two look identical. If you want the division written out with the subtractions visible, the polynomial division calculator and the synthetic division calculator both show that working.

Why x = 2 Is a Hole and x = 3 Is a Vertical Asymptote

Take f(x) = (x² − 4)/(x² − 5x + 6). Factor both sides and the reason jumps out:

(x − 2)(x + 2) / [(x − 2)(x − 3)]

Both x = 2 and x = 3 kill the denominator, so a careless answer reports two vertical asymptotes. But the factor (x − 2) appears on top as well. Cancel it and you are left with (x + 2)/(x − 3), which is perfectly finite at x = 2 — it equals 4/(−1) = −4. So the graph has a hole at the point (2, −4) and a vertical asymptote only at x = 3.

The general rule is about counting copies. Let m be how many times (x − r) divides the numerator and n how many times it divides the denominator:

  • m ≥ n → every copy in the bottom cancels, so you get a hole. Plug r into the reduced function for its y-coordinate.
  • m < n → n − m copies survive, so you get a vertical asymptote of that order.
  • Odd surviving order → the curve goes to +∞ on one side and −∞ on the other, like 1/x.
  • Even surviving order → both sides go the same way, like 1/x².

That last pair of bullets is what the calculator’s left/right table reports, and it is what stops a sketch from being wrong even when the asymptote list is right. Formally these are one-sided limits, so a one-sided limit calculator or a general limit calculator is the tool to reach for when you need the working written in limit notation.

A Graph Can Cross Its Horizontal Asymptote — Here Is One

“The curve never touches the asymptote” is true for vertical asymptotes and false for the other kinds. The confusion costs marks on sketching questions every year.

Try f(x) = (2x² − 3x)/(x² + 1). The degrees match, so the horizontal asymptote is y = 2. Now set the function equal to 2 and see what happens:

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

The graph passes straight through y = 2 at x = −2/3, then curls back and approaches the same line from below as x grows. Nothing is broken. A horizontal asymptote describes behaviour at infinity, and says nothing at all about what happens at x = −2/3.

There is a tidy way to count those crossings. Since f(x) − Q(x) = R(x)/D(x), the curve meets its end-behaviour line exactly where the remainder is zero. Here R(x) = −3x − 2, whose single root is x = −2/3. And because R always has lower degree than D, no rational function can cross its horizontal or slant asymptote more than deg D − 1 times.

Vertical asymptotes are different in kind. The function is undefined there — there is no value to touch, so the “never touches” rule really is a rule in that one case.

Asymptotes That Have Nothing to Do With Polynomials

Degree rules only apply to rational functions. Plenty of other families have asymptotes, and they come from limits rather than from division. This table covers the ones that show up in a first calculus course:

FunctionAsymptoteWhere it comes from
a·b^x + c  (0 < b < 1 or b > 1)y = cb^x → 0 on one side only
log(x − k)x = kThe log dives to −∞ at its domain edge
arctan(x)y = ±π/2Two different one-sided limits
tan(x)x = π/2 + nπInfinitely many, one per zero of cos x
√(x² + 1)y = ±xThe +1 stops mattering as |x| grows

Two things worth noticing. Exponentials have a horizontal asymptote on one side only — 2^x flattens toward y = 0 going left and grows without bound going right, so “the horizontal asymptote” is really a one-sided statement. And arctan has two different horizontal asymptotes, +π/2 and −π/2, which no rational function can do; if you want to see that behaviour numerically, the arctan calculator makes the ±1.5708 ceiling obvious. The hyperbola x²/a² − y²/b² = 1 gets its slant asymptotes y = ±(b/a)x the same way — see the hyperbola calculator for that family.

Cancel First, Then Test — the Order an Asymptote Calculator Follows

Almost every wrong answer on this topic comes from doing the right steps in the wrong order. This is the sequence the tool above runs, and it is the one to copy by hand:

  1. Factor both polynomials. Not optional — you cannot spot a hole in expanded form. The polynomial calculator is useful when the numerator is cubic or worse.
  2. Cancel shared factors and note each one. Those x-values become holes; they are still excluded from the domain even though the reduced function looks fine there.
  3. Read the vertical asymptotes off the reduced denominator. Only now, after cancelling.
  4. Compare the original degrees for end behaviour. Cancelling drops both degrees by the same amount, so the difference — and therefore the horizontal or slant asymptote — is unchanged. This is why it is safe to use the unreduced degrees here.
  5. Divide if the top is exactly one degree bigger. That quotient is the slant asymptote; the remainder is discarded.

The other classic slip is a sign. For f(x) = (x + 2)/(x − 3), the vertical asymptote is at x = 3, not x = −3 — the asymptote sits where the factor equals zero, not at the number printed inside it. And when the leading coefficients are negative, y = (−2x²)/(x²) gives y = −2, not y = 2. Sketching the result with a graphing calculator catches both mistakes in about five seconds.

For the formal definitions and the history — including why the word comes from the Greek for “not falling together” — the Wikipedia entry on asymptotes is a solid reference, and it covers the curvilinear case that most textbooks skip.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.