Saved

Press the star next to a tool's name to save it.

All my tools

Galileo's Paradox Calculator

Use this Galileo's paradox calculator to count the squares up to N, see their share of the numbers fall, and list the one-to-one pairs n and n² behind the paradox.

Restored your last values ·

Enter a whole number N. The calculator counts the squares up to N, shows what share of the numbers they are, and lists the first pairs n and n², which is the pairing behind Galileo's paradox.

Everything is worked out in your browser. Nothing you type is sent anywhere.

–

–

Enter N, then press Show the pairing.

See full result

A Galileo's paradox calculator shows the pairing behind a famous puzzle about infinity. Most whole numbers are not squares, so there seem to be more numbers than squares. Yet every number can be paired with its own square, so there seem to be just as many. Enter a number N and the calculator counts the squares up to N, shows how rare they become and lists the pairs. The history follows the Wikipedia page on Galileo's paradox, and the count follows the page on square numbers. The work is done in your browser.

How to use the Galileo's paradox calculator

  1. Enter a whole number N.
  2. Choose how many pairs to list.
  3. Press Show the pairing.

The paradox

The paradox appears in Galileo's book Two New Sciences, from 1638. The Wikipedia page explains the puzzle: some numbers are squares, such as 1, 4, 9 and 16, and most are not, so it seems that there must be more numbers than squares. But for every number there is exactly one square, and every square has exactly one square root, so the two collections can be matched one to one. The page calls this an early use of a one-to-one correspondence to compare infinite sets. The pairs 1 ↔ 1, 2 ↔ 4, 3 ↔ 9, 4 ↔ 16 and so on go on without end, and no number and no square is left over.

How rare squares become

The page quotes Galileo's own figures. Up to 100 there are 10 squares, which is one tenth of the numbers. Up to 10,000, the squares are one hundredth. Up to a million, they are one thousandth. The calculator reproduces these. The count of positive squares up to and including N is the whole part of the square root of N, as the page on square numbers states: for 100 it is 10, for 10,000 it is 100, for a million it is 1,000. As N grows, the share of squares, which is about 1 over the square root of N, shrinks toward zero. For N = 3,600 there are 60 squares, which is 1.67 percent of the numbers.

Galileo's conclusion

The page says that Galileo drew the conclusion that the words equal, greater and less belong only to finite quantities and cannot be applied to infinite ones. Each of the two collections is infinite, and the pairing seemed to show that they were equal, which contradicted the idea that a part is smaller than the whole. His answer was that the comparison does not apply to infinite collections at all.

Cantor and the modern view

The page notes that in the nineteenth century Georg Cantor found a framework in which comparing infinite sets is meaningful. In that framework, two sets have the same size if their members can be matched one to one, which is just what the pairing does. So the whole numbers and the squares have the same size. The same holds for the even numbers, and the page on countable sets gives the matching n ↔ 2n. Cantor also showed that some infinite sets are strictly larger than others. The real numbers, for instance, cannot be matched with the whole numbers.

What the calculator shows

For N = 100, it reports 10 squares, 10 percent, one square for every 10 numbers, and 90 numbers that are not squares. The list of pairs reads 1 ↔ 1, 2 ↔ 4, 3 ↔ 9 and so on up to 10 ↔ 100. The last pair of the list is always inside the range, and each pair uses a different number on each side. The key point is that you can always add one more pair, however large N is, which is why the pairing never runs out.

Why the paradox is not a contradiction

For finite sets, a proper part is always smaller than the whole. For infinite sets, this is not true, and the paradox shows that. This is not a contradiction in mathematics but a sign that our intuition about size, built on finite collections, does not carry over to the infinite. The comparison by pairing is the correct definition for infinite sets, and the rule that a part is smaller than the whole is a property of finite sets.

Why the gaps grow

The page on square numbers notes that n² − (n − 1)² equals 2n − 1, which means that the gap between one square and the next grows by 2 each time. After 1 and 4, the gap is 3, then 5, then 7. As the gaps widen, squares thin out among the whole numbers, which is why the share of squares keeps falling. Between 10,000 and 10,201, the next square after 100², there are 200 numbers that are not squares. And still, every number has its square, so the pairing continues without end.

Typing tips

Enter N as a whole number without commas. Large values such as one quadrillion are accepted, and the count is exact. The number of pairs to list can be up to 30.

Common mistakes

  • Treating the share as the size. A shrinking share does not make the infinite set smaller.
  • Counting zero. This calculator counts positive squares, starting at 1.
  • Expecting the pairing to end. It continues for every number.
  • Confusing the finite and infinite cases. Up to N the squares are fewer, but over all numbers they match.
  • Calling it a calculation. It is a thought experiment.

What next

Use this often? Add Galileo's Pa to your Home screen.

Frequently asked questions

What is Galileo's paradox calculator?

A tool that counts the squares up to N, shows their share of the numbers, and lists the pairs n ↔ n² that match each number with its square.

What is Galileo's paradox?

Most numbers are not squares, so there seem to be fewer squares than numbers, yet each number pairs with exactly one square, so they seem equal in number.

How many squares are there up to N?

The whole part of √N. Up to 100 there are 10, up to 10,000 there are 100, up to a million there are 1,000.

What was Galileo's conclusion?

That the words equal, greater and less apply only to finite quantities, not to infinite ones.

How did Cantor resolve it?

He defined size by one-to-one matching, so the whole numbers and the squares have the same size, though some infinite sets are strictly larger.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Fun & Lifestyle Tools