Number sequence calculator

Arithmetic and geometric sequences, with the closed form checked against the running total — and a stop at the term where the arithmetic leaves the numbers a computer can hold. Nothing you type here leaves your browser — it is worked out on your own device, so there is nothing to send and nothing to log.

Where a geometric sequence stops being arithmetic

Start at 1 and multiply by 10. The 309th term is 10308, which a computer can just about hold. The 310th is Infinity — not a big number, not an approximation, the arithmetic has simply left the range that double precision can represent.

Most calculators print that as a result. This one says where it happened and stops, because a sequence that has run out of number format is a different fact from a sequence with a very large term.

The closed form and the running total

Every arithmetic and geometric sequence has a formula for the nth term and for the sum, so you never have to add them up one at a time. This page computes both and compares them, which is worth doing: where they disagree it is floating point, and seeing the disagreement is more useful than picking one and presenting it as the answer.

Adding many numbers of very different sizes loses the small ones — add 1 to 1017 in double precision and nothing happens at all.

Arithmetic adds, geometric multiplies

An arithmetic sequence has a constant difference between terms; a geometric one has a constant ratio. The first grows in a straight line and the second explodes, which is why compound interest and epidemics are geometric and why people underestimate both.

Where to go next