Arithmetic, geometric and Fibonacci sequence calculator

The nth term and the sum of the first n terms of an arithmetic or geometric sequence, the sum to infinity, and exact Fibonacci numbers, with a table.

Drafted with AI writing toolsUpdated Checked examples: 7

Fibonacci counts from F₀ = 0, F₁ = 1; the others from a₁.
Try
nth term
nth term: 39
Maximum decimal places: 10; Nearest, ties away from zero
Sum of the first n terms
210

Starting at 3 and adding 4 each time, term 10 is 39 and the first 10 terms add up to 210.

Terms and running sum

050100150200246810Term number kValue
Term aₖRunning sum
Terms Rows: 10
kTerm aₖRunning sum Sₖ
133
2710
31121
41536
51955
62378
727105
831136
935171
1039210
How it's calculated S
  1. nth term

    an=a1+(n−1)d=3+(10−1)×4=39a_n = a_1 + (n - 1)d = 3 + (10 - 1) \times 4 = 39
  2. Sum of the first n terms

    Sn=n2(a1+an)=102(3+39)=210S_n = \frac{n}{2}(a_1 + a_n) = \frac{10}{2}\left(3 + 39\right) = 210

    Pair the first and last terms: each pair has the same total.

  3. Sum to infinity

    An arithmetic series with a non-zero term or step has no finite sum to infinity.

About the arithmetic, geometric and Fibonacci sequence calculator

An arithmetic sequence adds a fixed difference d at each step, so aₙ = a₁ + (n − 1)d and the first n terms sum to Sₙ = n(a₁ + aₙ)/2. A geometric sequence multiplies by a fixed ratio r, so aₙ = a₁rⁿ⁻¹ and Sₙ = a₁(1 − rⁿ)/(1 − r); when |r| < 1 the sum to infinity is a₁/(1 − r). Fibonacci numbers start from F₀ = 0 and F₁ = 1, add the previous two, and are computed exactly to every digit.

Savings that grow by a fixed amount, compound growth and exam questions all use these formulas. The default, 3, 7, 11, …, reaches 39 at term 10, and those 10 terms sum to 210; the halving series 1 + 1/2 + 1/4 + … totals 1.998046875 after 10 terms and approaches 2.

A geometric series with |r| ≥ 1 has no finite sum to infinity unless every term is 0. An arithmetic series has a finite sum to infinity only when every term is 0. The Fibonacci sum F₁ + … + Fₙ equals Fₙ₊₂ − 1.

How to find the nth term and sum of a sequence

For an arithmetic sequence, which adds the same difference d each step, the nth term is aₙ = a₁ + (n − 1)d and the first n terms sum to Sₙ = n(a₁ + aₙ)/2. For 5, 8, 11, …, the 20th term is 5 + 19 × 3 = 62, and the first 20 terms add up to 20 × (5 + 62)/2 = 670.

A geometric sequence multiplies by the same ratio r instead, so aₙ = a₁rⁿ⁻¹. For 3, 6, 12, …, the 8th term is 3 × 2⁷ = 384.

To tell which kind a list is, test consecutive terms:

  • If the differences are equal, it is arithmetic: 8 − 5 = 11 − 8 = 3.
  • If the ratios are equal, it is geometric: 6 ÷ 3 = 12 ÷ 6 = 2.
  • If neither holds, it is some other kind. The squares 1, 4, 9, 16 have differences 3, 5, 7, so neither formula fits.

A sequence is the ordered list; a series is the sum of its terms. The term number n is a position, so n = 10 asks for the tenth term, not for the term whose value is 10.

Arithmetic sequences: add the same difference

The formula uses n − 1 steps because the first term is already at position 1. The sum formula pairs the first and last terms, whose average equals the average of the whole list.

First termDifferencennth termSum
34133
3451955
341039210
100-7.520-42.5575
001000

A negative difference makes the sequence decrease, and it can cross zero. In the fourth row the 20th term is −42.5, yet the sum is still positive because the early terms are large. A zero difference repeats the first term.

Geometric sequences: multiply by the same ratio

For r ≠ 1, the first n terms sum to Sₙ = a₁(1 − rⁿ)/(1 − r). When r = 1 every term equals a₁, so the sum is n × a₁. A negative ratio alternates the signs, and a ratio of 0 leaves only the first term nonzero.

First termRationnth termFinite sumSum to infinity
236486728No finite sum
10.5100.0019531251.9980468752
3-0.54-0.3751.8752
514520No finite sum
6925460No finite sum

To find the ratio from two terms, they must be consecutive: 54 ÷ 6 = 9 in the last row. If the terms are k positions apart, their quotient is rᵏ.

When an infinite series has a finite sum

A geometric series with a nonzero first term converges only when |r| < 1. The terms then shrink toward zero, and the total approaches S∞ = a₁/(1 − r).

The halving series 1 + 1/2 + 1/4 + … totals 1.998046875 after ten terms and approaches 1/(1 − 1/2) = 2. The alternating series 3 − 1.5 + 0.75 − … approaches 3/(1 + 0.5) = 2 as well.

With r = 1 or r = −1 the partial sums grow or swing back and forth without settling, and an arithmetic series has no finite sum unless every term is zero.

Fibonacci numbers

The Fibonacci sequence starts F₀ = 0 and F₁ = 1, and each later term adds the two before it: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55. Counting from F₀ follows OEIS A000045, so F₁₀ = 55.

The sum of F₁ through Fₙ is always Fₙ₊₂ − 1. For n = 10 that is F₁₂ − 1 = 144 − 1 = 143.

nFibonacci term FₙSum F₁ through Fₙ
000
111
5512
1055143
20676517710
100354224848179261915075927372692193078999175

Entering a sequence

  • Arithmetic and geometric terms count from a₁, so n starts at 1; Fibonacci counts from F₀, so n can be 0.
  • n can reach 1,000,000 for arithmetic and geometric sequences and 10,000 for Fibonacci, with long Fibonacci terms given in full.
  • The ratio can be a fraction such as 1/2 or a decimal such as 0.5.

OpenStax explains the formulas in its chapters on arithmetic sequences, geometric sequences and series.

A single power such as 2⁷ is quicker in the exponent and root calculator, and a fixed comparison between two quantities is a job for the ratio calculator.

Worked examples

Arithmetic 3, 7, 11, … to 10 terms

Sequence
Arithmetic
First term a₁
3
Common difference d
4
Term number n
10
nth term
39
Sum of the first n terms
210

Checked against: Sum = 210, last term 39

Arithmetic with a negative step

Sequence
Arithmetic
First term a₁
100
Common difference d
-7.5
Term number n
20
nth term
-42.5
Sum of the first n terms
575

Checked against: Independent calculation

Geometric 2, 6, 18, … to 6 terms

Sequence
Geometric
First term a₁
2
Common ratio r
3
Term number n
6
nth term
486
Sum of the first n terms
728

Checked against: 2·3⁵ = 486, Σ 2·3^k (k < 6) = 728

Halving series 1 + 1/2 + 1/4 + …

Sequence
Geometric
First term a₁
1
Common ratio r
0.5
Term number n
10
nth term
0.001953125
Sum of the first n terms
1.998046875
Sum to infinity
2

Checked against: Σ (1/2)^k for k < 10 = 1023/512; sum to infinity 1/(1 − 1/2) = 2

Questions

How do you find the nth term of an arithmetic sequence?

Use aₙ = a₁ + (n − 1)d: start from the first term and add the common difference n − 1 times. For 3, 7, 11, … the difference is 4, so the 10th term is 3 + 9 × 4 = 39 and the 50th is 3 + 49 × 4 = 199. To find d from two terms, divide their difference by the gap in positions: (39 − 3)/(10 − 1) = 4.

What is the formula for the sum of an arithmetic series?

Sₙ = n(a₁ + aₙ)/2, the number of terms times the average of the first and last term. For 3 + 7 + … + 39, which has 10 terms, S = 10 × (3 + 39)/2 = 210. The pairing idea behind it is often credited to the young Gauss, who summed 1 to 100 as 50 pairs of 101 to get 5,050.

How do you find the sum of a geometric series?

For n terms, Sₙ = a₁(1 − rⁿ)/(1 − r) whenever r ≠ 1. For 2 + 6 + 18 + … with 6 terms, S = 2 × (1 − 3⁶)/(1 − 3) = 2 × (−728)/(−2) = 728. When r = 1 every term equals a₁, so Sₙ = n × a₁ and 5 + 5 + 5 + 5 = 20.

When does a geometric series have a sum to infinity?

When the first term is non-zero, the common ratio must be strictly between −1 and 1. An all-zero series sums to 0 for any ratio. For |r| < 1, rⁿ shrinks toward 0 and the sum approaches a₁/(1 − r): 1 + 1/2 + 1/4 + … = 1/(1 − 1/2) = 2, and 0.9 + 0.09 + 0.009 + … = 0.9/(1 − 0.1) = 1, which is why 0.999… equals 1. With |r| ≥ 1 the terms do not shrink, so the series grows without bound or oscillates.

What is the 100th Fibonacci number?

F₁₀₀ = 354,224,848,179,261,915,075, a 21-digit number, counting from F₀ = 0 and F₁ = 1 as in OEIS A000045. Consecutive Fibonacci numbers grow by a factor approaching the golden ratio φ ≈ 1.618034, so Fₙ is close to φⁿ/√5 and each term adds about 0.209 digits.

About this calculator

an=a1+(n−1)dSn=n2(a1+an)an=a1rn−1Sn=a11−rn1−r,S∞=a11−rFn=Fn−1+Fn−2\begin{gathered} a_n = a_1 + (n-1)d \\ S_n = \tfrac{n}{2}(a_1 + a_n) \\[10pt] a_n = a_1 r^{n-1} \\ S_n = a_1\frac{1 - r^n}{1 - r},\quad S_\infty = \frac{a_1}{1 - r} \\[10pt] F_n = F_{n-1} + F_{n-2} \end{gathered}

Sources

  1. Abramowitz & Stegun, Handbook of Mathematical Functions, §3.6 (series)
  2. OEIS A000045 — Fibonacci numbers
  3. Wikipedia — Geometric series

Checked against references

This calculator includes 7 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.