Squares & Cubes Table Generator

Squares & Cubes Table Generator

Growing AI Skill PRO

Enter Calculation

Results

Sum of Squares (1 to N)
385
Numbers summed: 10
n n² n³
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1,000
Totals 385 3,025

Formula

Square(k)=k2Cube(k)=k3for k=1,2,…,N∑k=1Nk2∑k=1Nk3\begin{gathered} \text{Square}(k) = k^2 \qquad \text{Cube}(k) = k^3 \\[1.5em] \text{for } k = 1, 2, \ldots, \text{N} \\[1em] \sum_{k=1}^{\text{N}} k^2 \qquad \sum_{k=1}^{\text{N}} k^3 \end{gathered}
Usage stats

Advertisement

Report an error on this page

What This Tool Does

The Squares & Cubes Table Generator builds a clean reference table listing every whole number from 1 up to your chosen value N, alongside its square (\(n^2\)) and cube (\(n^3\)). It also adds up all the squares and all the cubes so you have the totals at a glance. It's a handy companion for students learning powers, teachers preparing worksheets, and anyone who needs a quick lookup of perfect squares and cubes.

How to Use It

Enter a value for N (between 1 and 100) and submit. The calculator generates each row \(k\), \(k^2\), and \(k^3\) in order, then displays the sum of squares as the headline figure and includes the sum of cubes in the totals row. Because it's a pure mathematical tool, the results are exact and apply universally — no units, currency, or region matter here.

The Formula Explained

For each integer \(k\) from 1 to N, the square is computed as $$\text{Square}(k) = k^2 = k \times k$$ and the cube as $$\text{Cube}(k) = k^3 = k \times k \times k$$ The squares grow quadratically while the cubes grow cubically, which is why the cube column climbs much faster than the square column as numbers increase.

Advertisement
Flat diagram showing a number squared as a square area and cubed as a cube volume
\(n^2\) is the area of an n-by-n square, while \(n^3\) is the volume of an n-by-n-by-n cube.

Worked Example

For N = 5 the rows are: 1 → 1, 1; 2 → 4, 8; 3 → 9, 27; 4 → 16, 64; 5 → 25, 125. The sum of squares is $$1 + 4 + 9 + 16 + 25 = 55$$ and the sum of cubes is $$1 + 8 + 27 + 64 + 125 = 225$$ Notice that 225 = 55... actually 225 equals \((1+2+3+4+5)^2 = 15^2 = 225\) — a famous identity where the sum of the first n cubes equals the square of the triangular number.

Flat table layout with columns for n, n squared, n cubed and running totals
Each row pairs a number with its square and cube, with optional running totals at the bottom.

Common Perfect Squares and Cubes Reference (1–20)

The table below lists \(n\), \(n^2\) and \(n^3\) for the integers 1 through 20. The generator extends the same pattern to any N you enter.

n n² n³
1 1 1
2 4 8
3 9 27
4 16 64
5 25 125
6 36 216
7 49 343
8 64 512
9 81 729
10 100 1000
11 121 1331
12 144 1728
13 169 2197
14 196 2744
15 225 3375
16 256 4096
17 289 4913
18 324 5832
19 361 6859
20 400 8000

Useful landmarks

  • \(10^2 = 100\) and \(10^3 = 1000\): powers of ten are easy to remember.
  • \(12^2 = 144\): common in dozens and gross (a gross is 144 items).
  • \(15^2 = 225\).
  • \(20^2 = 400\) and \(20^3 = 8000\).
  • \(2^6 = 64\) is both a perfect square (\(8^2\)) and a perfect cube (\(4^3\)); 1 is also both.
Advertisement

Interpreting the Table and Its Patterns

Differences between consecutive squares

Consecutive squares differ by successive odd numbers:

$$n^2 - (n-1)^2 = 2n - 1$$

For example, \(7^2 - 6^2 = 49 - 36 = 13 = 2(7) - 1\). This is why the squares 1, 4, 9, 16, 25 are separated by gaps 3, 5, 7, 9.

Differences between consecutive cubes

$$n^3 - (n-1)^3 = 3n^2 - 3n + 1$$

For example, with \(n = 5\): \(125 - 64 = 61\), and \(3(25) - 3(5) + 1 = 75 - 15 + 1 = 61\).

Last digits

A perfect square can only end in the digits 0, 1, 4, 5, 6 or 9. A number ending in 2, 3, 7 or 8 is never a perfect square. Cubes, by contrast, can end in any digit from 0 to 9.

Running totals (sum formulas)

$$\sum_{k=1}^{n} k^2 = \frac{n(n+1)(2n+1)}{6}$$

$$\sum_{k=1}^{n} k^3 = \left[\frac{n(n+1)}{2}\right]^2$$

Note that the sum of the first n cubes equals the square of the sum of the first n integers.

Check with N = 10

Sum of squares: \(\frac{10 \cdot 11 \cdot 21}{6} = \frac{2310}{6} =\) 385.

Sum of cubes: \(\left[\frac{10 \cdot 11}{2}\right]^2 = 55^2 = 3025\).

You can confirm both by adding the n² and n³ columns in the table above for n = 1 to 10.

FAQ

What is the largest N allowed? You can generate a table up to N = 100.

Why does the sum of cubes equal a perfect square? Because of the identity $$1^3 + 2^3 + \cdots + n^3 = (1 + 2 + \cdots + n)^2$$ the total of the cube column is always a perfect square.

Are the values exact? Yes — every square and cube is computed precisely using integer multiplication.

Last updated:

Most popular in Educational

View all Educational calculators