Square Number Calculator
Find the nth square number, the count of dots in an n by n grid, with the previous square and its growth.
What it does
A square number, or perfect square, is the product of an integer with itself. The name comes from geometry: n squared dots can be arranged in a square with n dots on each side. The sequence begins 0, 1, 4, 9, 16 and 25.
Square numbers are among the oldest studied figurate numbers. They appear in the Pythagorean theorem, in area formulas and in checks for whether a number has an integer square root. Every square is a sum of consecutive odd numbers, which is why the gaps between squares grow by two each time.
The formula is the simplest of all figurate formulas. Multiply n by n and the result is exact. This page also computes the square at n minus one and the ratio between the two, which approaches one as n grows.
The input limit is one hundred thousand. At that size the square has ten digits and the tool prints it in full with no rounding or scientific notation.
Unlike some other figurate families, squares include zero at index zero. That makes the first ratio undefined, which the tool reports as not available.
How to use
- Enter a side length n from 0 to 100,000.
- Read n squared in the main result box.
- Check the previous square beside it.
- Use the growth ratio to see how the gaps narrow in relative terms.
- The default side 10 reproduces the worked example.
- Try n = 25 to confirm the value 625.
Formula
- n
- The number of dots along one side of the square.
- S(n)
- The total number of dots in the square.
The difference between successive squares is S(n) minus S(n - 1) equals two n minus one, an odd number. This gives the classic identity that the first n odd numbers add to n squared. The value at n = 0 is zero.
Worked example
Example: side 10
The page opens with n = 10.
- Write the formula: S(10) = 10 x 10.
- Multiply to get 100.
- Compute the previous square: 9 x 9 = 81.
- Find the gap: 100 - 81 = 19, which equals 2 x 10 - 1.
- Compute the ratio: 100 / 81 = 1.23.
- The tool reports 100, previous square 81, and growth 1.23x.
- A ten by ten grid contains exactly one hundred dots.
Reference table
| n | n squared | Previous | Gap |
|---|---|---|---|
| 0 | 0 | n/a | n/a |
| 1 | 1 | 0 | 1 |
| 2 | 4 | 1 | 3 |
| 5 | 25 | 16 | 9 |
| 10 | 100 | 81 | 19 |
| 25 | 625 | 576 | 49 |
Limits
- Only whole side lengths from zero upward are accepted.
- Inputs above 100,000 are rejected to keep the printed value short.
- The growth ratio is rounded to two decimals.
- The tool computes the count, not a geometric drawing.
Common mistakes
- Using two times n instead of n squared.
- Forgetting that zero squared is zero, not one.
- Assuming the gap between squares is constant rather than odd and increasing.
- Counting boundary dots twice when checking a grid by hand.
- Confusing a square number with a square root.
Try it yourself
Quick checks. Answers sit tucked under each question.
What is the tenth square number?
10 x 10 = 100, with 81 before it.
What is 25 squared?
625.
What is the gap between 100 and 81?
19, which equals 2 x 10 - 1.
Questions
Why are they called square numbers?
Because that many dots can be arranged in a square grid.
Is zero a square number?
Yes. Zero times itself is zero.
What is the gap between squares?
The gap after n squared is two n plus one, an odd number.
How do I test if a number is a square?
Compute its square root and check whether the result is a whole number.
Are the values exact?
Yes. Integer multiplication is used throughout.
What side lengths are accepted?
Whole numbers from 0 through 100,000.