Sequence Calculator
Paste a list of numbers to find the rule behind it: arithmetic, geometric, quadratic, Fibonacci, factorial, primes and more, with the nth term and next terms.
Sequence Calculator
Background.
Paste a list of numbers and this calculator works out which rule generated them, writes the rule down, and continues the sequence for as many terms as you want. It runs in the opposite direction to most sequence pages: instead of asking you for a first term and a common difference, it starts from the numbers you can actually see and tells you what they are.
That step is usually the whole problem. If you are looking at 2, 5, 8, 11, 14 and wondering what comes next, an arithmetic sequence calculator is no help until you have already noticed that each term adds 3. This page does the noticing. It names the pattern in plain words, gives you an nth-term rule you can write in a homework answer, and generates the continuation.
It checks a fixed list of patterns, in a fixed order, and names every one of them rather than claiming to be a universal pattern-finder: arithmetic (add the same amount each time), geometric (multiply by the same factor), quadratic, cubic and quartic (the gaps between terms change in a regular way, as in square, triangular and cube numbers), Fibonacci-style (each term is the sum of the two before it), consecutive cubes, multiply-then-add (double and add one gives 1, 3, 7, 15, 31), a growing multiplier (×2, ×3, ×4, which produces the factorials), harmonic (the reciprocals go up by a constant amount, as in 1, 1/2, 1/3, 1/4), consecutive primes, and two sequences interleaved at odd and even positions. If your numbers fit none of them, the calculator says so, shows the differences between your terms so you can see why, and stops. It never fits a curve to unrecognised data, because a confident wrong answer about what comes next is worse than an honest refusal.
The order matters because short sequences can satisfy two rules at once. The list 1, 2, 3 is arithmetic with a difference of 1, and it also satisfies the Fibonacci rule, since 3 = 1 + 2. Testing the simplest patterns first means the plain description wins, which is almost always the one intended.
Three terms are enough to test the simplest patterns, and the page tells you when that is all it had to go on. Every pattern needs at least one check beyond the numbers that fix it: two terms fix an arithmetic sequence and the third confirms it, so with exactly three terms an arithmetic, geometric or harmonic answer comes with a note asking for a fourth. Quadratic and Fibonacci-style need four terms, a cubic five, and a quartic six. Any list can be fitted by some formula if you allow enough freedom; requiring a check is what makes the answer mean something.
Your numbers are read as exact fractions, never through binary floating point, and you can type them that way: 1/2, 1/4, 1/8 works, and so does the − sign that textbooks print. That is why 0.1, 0.2, 0.3, 0.4 is correctly identified as arithmetic with a difference of exactly 0.1 — floating-point arithmetic computes 0.3 − 0.2 as 0.09999999999999998 and misses it — and why 81, 27, 9, 3 is reported with a ratio of exactly 1/3 rather than a rounded decimal. Answers come back in the form you typed: fractions if you used fractions, decimals otherwise, with repeating values such as 1/3 kept as fractions.
Once you know the pattern, the dedicated pages go further: arithmetic sequence for the nth term and partial sums, geometric sequence for the convergence test on infinite series, and fibonacci for exact large-index values.
What is sequence calculator?
A number sequence is an ordered list where position matters — the first term, the second term, and so on — and a sequence rule describes how each term is produced. This calculator tests an entered list against a fixed set of rules. An arithmetic sequence has a constant difference between consecutive terms, so aₙ = a₁ + d(n − 1); OpenStax College Algebra 2e §9.2 defines it as the case where 'the difference between any two consecutive terms is a constant'. A geometric sequence has a constant ratio, aₙ = a₁r^(n−1), which §9.3 describes as increasing or decreasing 'by a constant factor called the common ratio'. Polynomial sequences — quadratic, cubic and quartic — have a constant second, third or fourth difference and are generated by a polynomial of that degree in n; the square, triangular and cube numbers are the familiar examples. A Fibonacci-style sequence obeys aₙ = aₙ₋₁ + aₙ₋₂ from any starting pair. The remaining families are recurrences and named sets that turn up in puzzles: multiply-then-add, aₙ = r·aₙ₋₁ + c; a multiplier that grows by a constant step, as in the factorials, where aₙ = n·aₙ₋₁; harmonic sequences, whose reciprocals are arithmetic; consecutive cubes; consecutive primes; and two arithmetic or geometric sequences interleaved at odd and even positions. Sequences built from digit patterns, word puzzles or one-off tricks are outside this page's scope, and it declines them explicitly.
How to use this calculator.
- Type or paste your numbers in order, separated by commas or spaces. Fractions such as 1/4 are fine, and so is a trailing '?' or '…'.
- Three terms are enough for the simplest patterns; four or more lets the calculator test every pattern and confirm the answer.
- Set how many further terms you want generated, from 1 to 50.
- Read the pattern line first — it names the pattern and its key number, for example 'each term is 3 more than the one before it'.
- Use the nth-term rule for homework and the continued sequence to check your own working. If the calculator refuses, read the differences it shows: a typo or a term out of order usually stands out there.
The formula.
The calculator reads your terms as exact fractions and runs its tests in a fixed order, stopping at the first that fits. First it takes every first difference aₖ − aₖ₋₁ and checks that they are identical; if so the sequence is arithmetic and the rule is aₙ = a₁ + d(n − 1). Next it checks every ratio aₖ ⁄ aₖ₋₁ — skipping the test if any term is zero, since a geometric sequence never contains one — and if they agree the rule is aₙ = a₁r^(n−1). Then it builds the difference table: second differences are the changes in the first differences, third differences the changes in those. A constant second difference means a quadratic, and the rule follows from Newton's forward-difference formula, aₙ = a₁ + Δ₁(n − 1) + Δ²(n − 1)(n − 2)/2, expanded into powers of n. You can check it on the squares 1, 4, 9, 16: a₁ = 1, Δ₁ = 3 and Δ² = 2, so aₙ = 1 + 3(n − 1) + (n − 1)(n − 2), which simplifies to n². Fibonacci-style is tested next, then consecutive cubes, then a constant third or fourth difference, which extends the same formula to a cubic or quartic. The recurrence families follow. Multiply-then-add takes r = (a₃ − a₂)/(a₂ − a₁) and c = a₂ − r·a₁ from the first three terms and checks every later term against aₖ = r·aₖ₋₁ + c; the growing-multiplier test checks that the ratios themselves change by a constant step; the harmonic test checks that the reciprocals do. Consecutive primes and the odd-and-even split come last. Every family requires at least one check beyond the terms that fix its parameters, which is why each has a minimum number of terms. Because the arithmetic is exact, no test uses a tolerance: 0.1, 0.2, 0.3 has a difference of exactly 1/10, and 81, 27, 9, 3 a ratio of exactly 1/3. The text outputs show exact values, with repeating values such as 1/3 written as fractions; the numeric next-term and sum outputs are given to 10 decimal places.
A worked example.
Enter 2, 5, 8, 11, 14 and ask for five more terms. The first test takes the differences: 5 − 2 = 3, 8 − 5 = 3, 11 − 8 = 3, 14 − 11 = 3. They are all identical, so the pattern output reports an arithmetic sequence where each term is 3 more than the one before it, and none of the later tests is run. With a first term of 2 and a common difference of 3, the rule output reads aₙ = 2 + 3(n − 1). The next term output is the sixth term, 2 + 3 × 5 = 17, and the continued sequence output carries on 17, 20, 23, 26, 29. The terms-entered output confirms 5 numbers were read, and the sum output adds them to 40 — which you can check against the arithmetic series formula, 5 × (2 + 14) ⁄ 2 = 40. If you wanted the hundredth term or the total of the first fifty terms rather than the next five, the arithmetic sequence calculator takes it from here, now that you know a₁ = 2 and d = 3.
Frequently asked questions.
What patterns can this calculator recognise?
How many numbers do I need to enter?
What happens if my sequence fits more than one rule?
Why did it refuse my sequence?
Can I type fractions or negative numbers?
Does the order of my numbers matter?
How is this different from a linear regression calculator?
References& sources.
- [1]OpenStax (Rice University), College Algebra 2e, §9.2 'Arithmetic Sequences' — 'The difference between any two consecutive terms is a constant. This constant is called the common difference', and aₙ = a₁ + d(n − 1). Retrieved 2026-07-29; open access.
- [2]OpenStax (Rice University), College Algebra 2e, §9.3 'Geometric Sequences' — 'Each term of a geometric sequence increases or decreases by a constant factor called the common ratio', and aₙ = a₁r^(n−1). Retrieved 2026-07-29; open access.
- [3]Wolfram MathWorld, 'Fibonacci Number' — equation 1, the two-step recurrence Fₙ = Fₙ₋₁ + Fₙ₋₂ that this page's Fibonacci-style family generalises to arbitrary starting pairs. Retrieved 2026-07-29; open access.
- [4]Encyclopedia of Mathematics (European Mathematical Society), 'Arithmetic progression' — independent check on the arithmetic test: the characteristic property aₙ = (aₙ₊₁ + aₙ₋₁)/2, every term being the mean of its neighbours. Applied to 2, 5, 8, 11, 14 it reaches the same verdict as the constant-difference test. Retrieved 2026-07-29; open access.
- [5]OpenStax (Rice University), Calculus Volume 1, §5.1 'Approximating Areas', rule 'Sums and Powers of Integers' — Σ i = n(n+1)/2 and Σ i² = n(n+1)(2n+1)/6, the closed forms behind the triangular and square-number examples used for the quadratic family. Retrieved 2026-07-29; open access.
- [6]Wolfram MathWorld, 'Finite Difference' — the forward-difference table and the unique polynomial of degree at most n through n + 1 points, the method this page uses to recover quadratic, cubic and quartic rules exactly. Retrieved 2026-10-27; open access.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 6 cited below
- Method
- Δ constant → arithmetic · ratio constant → geometric · Δ², Δ³ or Δ⁴ constant → quadratic, cubic, quartic · aₙ = aₙ₋₁ + aₙ₋₂ → Fibonacci-style · aₙ = r·aₙ₋₁ + c → multiply then add
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled