Skip to content

Sequence Calculator

Type the first few terms of a sequence and see the pattern, the nth-term formula, any term you choose and the sum of the first n terms. It handles arithmetic and geometric sequences, and also quadratic and Fibonacci-like ones, with exact fractions and every step shown.

Two known terms, find a term, sum to infinity, chart
What do you know?

Separate terms with commas. Fractions (1/2), mixed numbers (1 1/2), decimals and negatives all work.

Count terms from
Show numbers as

Auto shows decimals if you typed decimals, and exact fractions otherwise.

Terms to list
ResultUpdates as you type—nth term—Sum—Common difference—Sum to infinityTermsWorking

    How your sequence is worked out

    Your terms, step by step: spot the pattern, write the rule, find term n, then add them up.

    1. 1

      Spot the pattern

      gaps 4, 4, 4all the samed = 4

    2. 2

      Write the rule

      aₙ = a₁ + (n − 1)daₙ = 4n − 1

    3. 3

      Find term 20

      3 + (20 − 1) × 4a₂₀ = 79

    4. 4

      Add them up

      20 ÷ 2 × (3 + 79)S₂₀ = 820

    Read more: the formulas, a worked example and a table of sequence types

    A sequence is a list of numbers that follows a rule. In an arithmetic sequence you add the same amount each time (the common difference d). In a geometric sequence you multiply by the same amount each time (the common ratio r). Some sequences follow other rules: in a quadratic one the gaps grow by the same amount, and in a Fibonacci-like one each term is the two before it added.

    The formula

    Arithmetic: nth term aₙ = a₁ + (n − 1) × d
    sum of the first n terms Sₙ = n ÷ 2 × (2a₁ + (n − 1) × d) = n ÷ 2 × (a₁ + aₙ)
    Geometric: nth term aₙ = a₁ × r^(n − 1)
    sum of the first n terms Sₙ = a₁ × (1 − rⁿ) ÷ (1 − r), or n × a₁ when r = 1
    sum to infinity S∞ = a₁ ÷ (1 − r), only when r is between −1 and 1
    Quadratic: aₙ = An² + Bn + C, where A = second difference ÷ 2
    Fibonacci-like: aₙ = aₙ₋₁ + aₙ₋₂, and Sₙ = aₙ₊₂ − a₂

    Worked example

    Arithmetic (the default): 3, 7, 11, 15, n = 20. The gaps are 7 − 3 = 4, 11 − 7 = 4 and 15 − 11 = 4, so d = 4. The rule is aₙ = 3 + (n − 1) × 4 = 4n − 1. Term 20 is a₂₀ = 3 + 19 × 4 = 3 + 76 = 79. The sum of the first 20 terms is S₂₀ = 20 ÷ 2 × (3 + 79) = 10 × 82 = 820.

    Geometric: 2, 6, 18, n = 10. 6 ÷ 2 = 3 and 18 ÷ 6 = 3, so r = 3. Term 10 is a₁₀ = 2 × 39 = 2 × 19,683 = 39,366. The sum of the first 10 terms is S₁₀ = 2 × (1 − 310) ÷ (1 − 3) = 2 × (1 − 59,049) ÷ (−2) = 59,048.

    Sum to infinity: 1, 1/2, 1/4. r = 1/2, which is between −1 and 1, so S∞ = 1 ÷ (1 − 1/2) = 1 ÷ 1/2 = 2. The first 10 terms already add up to 1,023/512 ≈ 1.998.

    Quadratic: 4, 9, 16, 25. The gaps are 5, 7, 9 and the gaps of the gaps are 2, 2. So A = 2 ÷ 2 = 1. The first gap is 3A + B, so B = 5 − 3 = 2, and the first term is A + B + C, so C = 4 − 1 − 2 = 1. The rule is aₙ = n² + 2n + 1, and term 10 is 100 + 20 + 1 = 121.

    Fibonacci-like: 1, 1, 2, 3, 5. Each term is the two before it added. Carrying on gives 8, 13, 21, 34, 55, so a₁₀ = 55. The first 10 terms add up to a₁₂ − a₂ = 144 − 1 = 143.

    Missing terms: term 1 is 2 and term 5 is 32. They are 4 steps apart. Geometric: r4 = 32 ÷ 2 = 16, so r = 2 (or −2), and the missing terms are 4, 8, 16. Arithmetic: d = (32 − 2) ÷ 4 = 7.5, and the missing terms are 9.5, 17, 24.5.

    Which kind of sequence is it?

    TypeHow to spot itExamplenth term
    ArithmeticSame gap every time3, 7, 11, 154n − 1
    GeometricSame ratio every time2, 6, 18, 542 × 3n−1
    QuadraticSame second gap1, 4, 9, 16n²
    Triangular numbersGaps 2, 3, 4, …1, 3, 6, 10n(n + 1) ÷ 2
    Fibonacci-likeAdd the last two1, 1, 2, 3, 5aₙ₋₁ + aₙ₋₂
    ConstantGap 0 (and ratio 1)5, 5, 5, 55

    Good to know

    • With only 2 terms, both an arithmetic and a geometric rule fit (2, 6 could go on 10, 14 or 18, 54). The calculator picks arithmetic and tells you the ratio, so add a third term to be sure.
    • Any 3 numbers fit some quadratic rule, so a 4th term is needed to be sure a sequence is really quadratic.
    • Some books count from a₀ instead of a₁. In Advanced you can switch: then aₙ = a₀ + n × d and aₙ = a₀ × rⁿ, and the “first n terms” run from a₀ to aₙ.
    • A sum of a sequence is also called a series: an arithmetic series or a geometric series.

    Every answer is worked out exactly with whole numbers and fractions of any size, up to 20,000 digits. Past that, terms and sums are shown as powers of 10 with 8 significant figures. When two known terms give a ratio that is not a fraction (like r² = 3), the ratio and terms are decimals, rounded to about 10 significant figures.

    Common questions

    How do I tell if a sequence is arithmetic or geometric?

    Subtract each term from the next. If the gaps are all the same, it is arithmetic and the gap is the common difference d. If not, divide each term by the one before. If those ratios are all the same, it is geometric and the ratio is r. For 3, 7, 11, 15 the gaps are all 4. For 2, 6, 18 the ratios are all 3.

    What is the formula for the nth term?

    Arithmetic: aₙ = a₁ + (n − 1)d. Geometric: aₙ = a₁ × r^(n−1). For 3, 7, 11, 15 that is aₙ = 3 + (n − 1) × 4 = 4n − 1, so term 20 is 79. For 2, 6, 18 it is aₙ = 2 × 3^(n−1), so term 10 is 2 × 3⁹ = 39,366.

    How do you find the sum of a sequence?

    For an arithmetic sequence, Sₙ = n ÷ 2 × (first term + last term). The first 20 terms of 3, 7, 11, … add up to 20 ÷ 2 × (3 + 79) = 820. For a geometric sequence, Sₙ = a(1 − rⁿ) ÷ (1 − r), so the first 10 terms of 2, 6, 18, … add up to 59,048.

    When does a geometric series have a sum to infinity?

    Only when the ratio is between −1 and 1. Then the terms shrink towards 0 and the total settles at S∞ = a ÷ (1 − r). For 1, 1/2, 1/4, … the sum to infinity is 1 ÷ (1 − 1/2) = 2. With r = 2 or r = −1 the total never settles.

    What if the gaps are not the same?

    Look at the gaps of the gaps (the second differences). If those are all the same, the rule is quadratic, aₙ = An² + Bn + C, and A is half the second difference. For 4, 9, 16, 25 the gaps are 5, 7, 9 and the second differences are 2, so A = 1 and the rule is n² + 2n + 1. If each term is the two before it added, it is Fibonacci-like.

    How do I find the missing terms between two numbers?

    Count the steps between them. For an arithmetic sequence, d = (later term − earlier term) ÷ steps. For a geometric one, r is the root of (later ÷ earlier), with steps as the root. Between 2 and 32 four steps apart: arithmetic gives d = 7.5 (9.5, 17, 24.5) and geometric gives r = 2 (4, 8, 16) or r = −2 (−4, 8, −16).

    Related calculators

    Exponent calculatorPowers with negative and fractional exponents, exact huge numbers, find the exponent or base, nth roots as surds, logs and antilogs in any base, with steps.Quadratic formula calculatorSolve ax² + bx + c = 0 or a typed equation with steps: exact surd and complex roots, discriminant, factoring, vertex, inequalities and a graph.Exponential growth and decay calculatorx(t) = x₀(1 + r)^t for growth or decay: final value, start, rate or time, doubling time or half-life beside the rule of 70, continuous e^(kt), rate from two points, a chart and table.Fraction calculatorAdd, subtract, multiply, divide and simplify fractions, with steps.

    Made by Zulu Calculator, part of AlphaZulu LLC. Formulas are shown in full and rule figures are checked against official sources; see how we build calculators.

    Embed this calculator on your site

    Free to use on your website or blog. Paste this code where you want the calculator to appear. Please keep the credit link.

    Sequence calculator (arithmetic & geometric) by Zulu Calculator ↗