Enter a whole number n to test whether sqrt(n) is rational or irrational — it is rational only when n is a perfect square — and see its decimal value too.
Irrational Calculator
An exact test, not a decimal guess: is the square root of your number irrational?
Enter your values
Fill in the fields below — the result appears with every step shown.
Your result will appear here
Enter your values above, then press Calculate — or press Enter in any field.TinyExe · Irrational Result
Calculated locally in your browser
—
Name
—
Integer under the square root (n in √n)
—
Decimal places to show
—
Result
—
How this was calculated
What to do next
TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.
Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.
The short answer
An irrational number cannot be written as a ratio of two integers. For square roots the test is exact: the square root of a whole number is rational only when that number is a perfect square, and irrational otherwise. So root ten is irrational, approximately 3.162278, while root sixteen is exactly four, a rational integer.
- sqrt(n) is rational if and only if n is a perfect square
- sqrt(2) ≈ 1.414214 is the classic irrational
- Irrational decimals never terminate or repeat
Rational or irrational square roots
Reference values for this calculator.
| n | sqrt(n) | Class |
|---|---|---|
| 9 | 3 | Rational (perfect square) |
| 2 | 1.414213… | Irrational |
| 25 | 5 | Rational (perfect square) |
| 7 | 2.645751… | Irrational |
The formula
The exact formula this calculator uses — every variable in it is explained in the card below.
The formula
Ideas enhancement: classifies exactly (perfect-square test, not a decimal guess) and brackets n between neighbouring perfect squares.
Worked examples
Worked examples with the full working shown — try them in the calculator to check.
Example 1
Classic non-square
n = 10
| Calculation | Steps |
|---|---|
| 10 is not a perfect square (9 < 10 < 16), so sqrt(10) is irrational; decimal ≈ 3.162278. | sqrt(10) irrational, ≈ 3.162278. |
Result
Example 2
Perfect square boundary
n = 16
| Calculation | Steps |
|---|---|
| 16 = 4² exactly, so sqrt(16) = 4, a rational integer. | sqrt(16) = 4, rational. |
Result
Example 3
Large non-square
n = 999
| Calculation | Steps |
|---|---|
| 31² = 961 and 32² = 1024, so 999 is not a square; sqrt(999) ≈ 31.606961, irrational. | sqrt(999) irrational, ≈ 31.606961. |
Result
How to use this calculator
Step 1
Enter a whole number n to test the square root of n.
Step 2
Press Calculate — the test is exact, not based on decimals.
Step 3
Read the classification: rational only for perfect squares.
Step 4
See where n sits between neighbouring perfect squares.
Step 5
Use the decimal approximation for practical work.
Frequently asked questions
How do you know a number is irrational?
A classic theorem: the square root of a whole number is either a whole number (perfect square) or irrational — never a non-integer fraction. This tool applies that exact test.
Is sqrt(2) really irrational?
Yes — proved by contradiction since ancient Greek mathematics: if sqrt(2) were p/q in lowest terms, both p and q would have to be even, a contradiction.
Are pi and e covered?
They are famous irrationals (indeed transcendental), but this tool is scoped to square roots of whole numbers, which it classifies exactly.
Why not just look at the decimal?
A long non-repeating-looking decimal is only evidence, not proof — the perfect-square test is exact for every whole number n.
Is 0 an irrational number?
No — 0 is a rational integer (0 = 0/1). Its square root is 0 as well, which this calculator classifies as rational.
About this calculator
An irrational calculator tests the square root of a whole number exactly: if the number is a perfect square its root is a rational integer, otherwise the root is irrational — and it shows the decimal approximation either way.
Rational numbers are exactly the ratios of integers; irrational numbers are the reals that are not — their decimals neither terminate nor repeat. The square-root case is special because it admits a perfect test: a theorem of number theory says sqrt(n) for a whole number n is either a whole number or irrational, with no middle case of a tidy fraction like 7/5.
The famous proof for sqrt(2) works by contradiction: if sqrt(2) equalled p/q in lowest terms, squaring would force both p and q to be even, contradicting 'lowest terms'. Versions of this argument extend to every non-square n, which is the result this calculator applies — an exact classification, not a guess from a truncated decimal.
Being irrational does not mean being unusable: sqrt(10) ≈ 3.162278 is exact enough for engineering at six decimals, and surd form (like 2 sqrt(3)) is often the most exact way to carry the value through further algebra — the rationalisation tool builds on exactly that idea.
Use it for number-classification homework, for checking whether a surd answer can be simplified to a whole number, and for understanding why roots like sqrt(2) can never be written as exact fractions.
How to calculate it yourself
Step 1
Take the whole number n whose square root you are testing.
Step 2
Find the largest perfect square at or below n and the next square above it.
Step 3
If n equals one of the perfect squares, sqrt(n) is that root — rational.
Step 4
Otherwise sqrt(n) lies between two integers and is irrational by the square-root theorem.
Step 5
Use a decimal approximation (or simplified surd form) for practical computation.
Real-life examples
Diagonal of a square tile
A 1 m square tile's diagonal is sqrt(2) metres by Pythagoras; a tiler asks whether it is a tidy number.
2 is not a perfect square, so the diagonal is irrational: ≈ 1.414214 m. Cut lists therefore use the decimal, never an exact fraction.
Diagonal ≈ 1.414 m, exactly sqrt(2).
Screen size check
A monitor's 16:9 panel with a 3840-pixel width has irrational-ratio geometry in several derived lengths; a student checks sqrt(512) while modelling pixel diagonals.
512 = 256 x 2 is not a perfect square, so sqrt(512) is irrational: ≈ 22.627417, better carried as 16 sqrt(2).
sqrt(512) = 16 sqrt(2) ≈ 22.627.
Ideas & use cases
- Surd simplification prep: run a radicand here first — if it is a perfect square the 'surd' collapses to an integer before you rationalise anything.
- Proof-reading practice: test the claim 'sqrt(49/81) is irrational' by noting both parts are squares — the tool's logic explains why that one is rational (7/9).
- Estimation drill: predict which two integers sqrt(n) sits between before calculating; the bracketing squares in the details mark your answer.
Limitations & sources
- Scoped to square roots of whole numbers; it does not prove irrationality of arbitrary expressions, pi, or e.
Sources: Classic theorem on square roots of integers: Hardy & Wright, An Introduction to the Theory of Numbers; OpenStax Algebra, irrational numbers
