Is it rational or irrational? Test decimals, fractions, repeating decimals and square roots — with the reason why.
Try 0.5, 1/2, 0.(3), sqrt(2), pi or 2.25.
How to use this tool
A decimal, a fraction like 1/2, a repeating decimal like 0.(3), sqrt(2), or pi.
The big word is the classification — rational or irrational — with the decimal value below.
The note explains why: fractions and repeating decimals are always rational, non-square roots never are.
Test sqrt(2), pi, 0.(9) and 22/7 — the last two surprise people for opposite reasons.
Formula & worked example
Worked example: 0.(3) means 0.333… repeating. Let x = 0.333…, then 10x = 3.333…, so 9x = 3 and x = 1/3 — a fraction, hence rational. By contrast sqrt(2) = 1.41421356… never repeats, so it is irrational even though 1.414 looks tidy.
Limitations — read this before you rely on it
This calculator tests the exact value you typed, not a rounded one: a long terminating decimal like 1.41421356 is rational (it is a fraction over 10^8), even though it approximates irrational sqrt(2). The repeating-decimal notation uses parentheses, as in 0.(3) or 0.1(6).
Frequently asked questions
Any number that can be written as a fraction p/q of two integers. That includes all integers, all terminating decimals (0.5 = 1/2) and all repeating decimals (0.(3) = 1/3).
A number that cannot be written as a fraction. Its decimal expansion goes on forever without repeating. The famous examples are π, e and the square roots of non-square numbers like 2, 3 and 5.
No — 22/7 is a fraction, so it is rational, and it equals 3.142857… while π is 3.141592… They agree to two decimal places, which is why 22/7 is a handy approximation, not an identity.
Yes. Let x = 0.999…, then 10x = 9.999…, so 9x = 9 and x = 1. It is rational either way — as the fraction 1/1.
No — sqrt(4) = 2, a whole number, so it is rational. Only square roots of non-perfect-squares (2, 3, 5, 6, 7, 8, …) are irrational.
