Math calculator

Free number sequence calculator

Generate arithmetic or geometric number sequences — enter the starting value, common difference or ratio, and number of terms to see the full sequence, updated live, as you type.

InputsLive
Sequence type
First term (a₁)
Common difference (d)
Number of terms (n)
Maximum 20 terms shown.
Result
Sequence (first 8 terms)
1, 3, 5, 7, 9, 11, 13, 15
Sum: 64 · nth term: 15
Typearithmetic
Sum64
nth term15
Terms8

Arithmetic: each term += common difference. Geometric: each term ×= common ratio.

Results are estimates. Consult a professional.

How it's calculated

How the number sequence calculator works

A number sequence is an ordered list of numbers following a rule. The two most important types are arithmetic sequences (constant difference between terms) and geometric sequences (constant ratio between terms). Given the first term, the common difference or ratio, and the position n, the calculator finds any term and optionally the sum of the first n terms.

Arithmetic: aₙ = a₁ + (n 1)d
Arithmetic sum: Sₙ = n/2 × (a₁ + aₙ)
Geometric: aₙ = a₁ × r^(n 1)
Geometric sum: Sₙ = a₁ × (1 rⁿ) / (1 r) [r ≠ 1]
Arithmetic and geometric progression formulas are standard results in algebra, documented in all major pre-calculus and discrete mathematics curricula.
Example

Worked example: arithmetic and geometric sequences

Example: start=2, d=3 (arithmetic) and start=3, r=2 (geometric)

Find the first five terms and the sum of the first 5 terms for an arithmetic sequence starting at 2 with common difference 3, and a geometric sequence starting at 3 with ratio 2.

Arithmetic (a₁=2, d=3):
a₁=2, a₂=5, a₃=8, a₄=11, a₅=14
S₅ = 5/2 × (2 + 14) = 2.5 × 16 = 40
Geometric (a₁=3, r=2):
a₁=3, a₂=6, a₃=12, a₄=24, a₅=48
S₅ = 3 × (1 2⁵) / (1 2) = 3 × (31) / (1) = 93
S₅ = 40 (arithmetic)
Arithmetic 2, 5, 8, 11, 14 — sum = 40. Geometric 3, 6, 12, 24, 48 — sum = 93.
Quick reference

First 10 terms of common sequences

These four sequences appear throughout mathematics, computer science, and nature. Knowing their first terms helps you identify patterns and verify calculations quickly.

SequenceRuleFirst 10 terms
Natural numbersn1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Perfect squares1, 4, 9, 16, 25, 36, 49, 64, 81, 100
Powers of 22^n (n≥0)1, 2, 4, 8, 16, 32, 64, 128, 256, 512
FibonacciF(n)=F(n-1)+F(n-2)1, 1, 2, 3, 5, 8, 13, 21, 34, 55
Triangular numbersn(n+1)/21, 3, 6, 10, 15, 21, 28, 36, 45, 55
Odd numbers2n − 11, 3, 5, 7, 9, 11, 13, 15, 17, 19

Fibonacci starts F(1)=1, F(2)=1. Powers of 2 start at 2⁰=1.

Practical tips

Tips for number sequences

Identifying the sequence type is the first step — once you know whether it is arithmetic or geometric, the formulas do the rest.

  • Test for arithmetic first — Subtract consecutive terms. If the differences are all equal, it is arithmetic. The common difference d can be negative (decreasing sequence) or fractional.
  • Test for geometric next — Divide consecutive terms. If the ratios are all equal, it is geometric. A ratio between 0 and 1 produces a decreasing sequence; a negative ratio alternates signs.
  • Sum formula shortcut (arithmetic) — Gauss's trick: pair the first and last term, multiply by the count, divide by 2. S₁₀₀ of natural numbers = 100 × 101 / 2 = 5,050.
  • Infinite geometric series — When |r| < 1, the infinite sum converges: S∞ = a₁ / (1 − r). For example, 1 + ½ + ¼ + … = 1 / (1 − 0.5) = 2.
  • Recursive vs. explicit formulas — The explicit formula (aₙ = …) lets you jump straight to any term. The recursive definition (aₙ = aₙ₋₁ + d) requires computing every previous term first.
Accuracy & limits

Accuracy and limitations

The arithmetic and geometric formulas are algebraically exact. For very large n or very large r, geometric sequence terms grow exponentially and may exceed the range of standard floating-point numbers (approximately 1.8 × 10³⁰⁸ for 64-bit IEEE 754). Fibonacci and other recursive sequences can be computed exactly for moderate n; for very large n (beyond roughly 75 terms), values exceed JavaScript's safe integer range and require arbitrary-precision arithmetic.

Glossary

Key terms

A sequence in which each term is obtained by adding a fixed value (the common difference d) to the previous term. Example: 3, 7, 11, 15, … (d = 4).
A sequence in which each term is obtained by multiplying the previous term by a fixed value (the common ratio r). Example: 2, 6, 18, 54, … (r = 3).
The constant added between consecutive terms of an arithmetic sequence. Positive d means increasing; negative d means decreasing.
The constant multiplied between consecutive terms of a geometric sequence. |r| > 1 means growing; 0 < |r| < 1 means shrinking toward zero.
The sum of the first n terms of a sequence. For arithmetic sequences, Sₙ = n/2 × (a₁ + aₙ).
A sequence where each term is the sum of the two preceding terms (1, 1, 2, 3, 5, 8, …). Neither arithmetic nor geometric, but it appears throughout nature and mathematics.
About

About this calculator

Part of our math calculators suite — explore all calculators.

Questions

Frequently asked questions about the free number sequence calculator

A number sequence calculator is a free online tool that helps you generate arithmetic or geometric sequences. Standard sequence formulas. It runs entirely in your browser with instant results and no sign-up.
JavaScript double-precision floating-point — accurate to about 15-17 significant digits. For arbitrary precision, use the Big Number calculator.
The statistics calculator computes population variance (divides by n). For sample variance, multiply variance by n/(n-1).

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.