Is this number rational or irrational?
A rational number calculator that tells you whether a number is rational or irrational, and why. Type a fraction, a decimal, a repeating decimal, a root, π, e, or a short expression such as (1 + √5)/2.
- Rational or irrational
- Irrational
Is √2 rational or irrational? Irrational. It is √2, and 2 is not the square of a fraction, so its square root is irrational.
- Why
- It is √2, and 2 is not the square of a fraction, so its square root is irrational.
- Exact value
- √2
- Decimal
- ≈ 1.41421356237
- Decimal type
- neither ends nor repeats
- Approximate value
- 1.41421356237
- Number sets
- Irrational number, real number
Rational or irrational: Irrational. Is √2 rational or irrational? Irrational. It is √2, and 2 is not the square of a fraction, so its square root is irrational.
How to calculate
Tells whether a number is rational or irrational, with the reason: fractions, terminating and repeating decimals, square and cube roots, π, e and simple expressions such as (1 + √5)/2.
Example with the default inputs (Number √2): Is √2 rational or irrational? Irrational. It is √2, and 2 is not the square of a fraction, so its square root is irrational.
Method: Read the number exactly as a + b·X, with a and b fractions and X one of √r, ∛r, π, 1/π, e, 1/e. It is rational when b = 0 (√r and ∛r count as rational when r is a square or a cube of a fraction), and irrational otherwise.
- Decimals are read exactly: 0.75 is 3/4, and repeating digits are marked with brackets, 0.1(6), or typed twice before dots, 0.1666….
- π and e are irrational; so is the square root of a fraction that is not a square, and the cube root of one that is not a cube.
- Expressions mixing two kinds of irrational part (√2 + √3, π + e) are not read.
Worked examples
Each example is checked against the calculator on every build.
- Number √2 gives Rational or irrational Irrational, Why It is √2, and 2 is not the square of a fraction, so its square root is irrational., Approximate value 1.41421356237.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number √36 gives Rational or irrational Rational, As a fraction 6, Number sets Counting number, whole number, integer, rational number, real number.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number √44 gives Rational or irrational Irrational, Exact value 2√11, Decimal type neither ends nor repeats.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number 0.58(3) gives Rational or irrational Rational, As a fraction 7/12, Decimal 0.583̅, Decimal type repeats.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number 0.475 gives Rational or irrational Rational, As a fraction 19/40, Decimal type ends, Why It equals 19/40, a ratio of two integers..Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number (1 + √5)/2 gives Rational or irrational Irrational, Exact value 1/2 + (1/2)√5, Approximate value 1.61803398875.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number √2 × √8 gives Rational or irrational Rational, As a fraction 4.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number 2π/3 gives Rational or irrational Irrational, Exact value (2/3)π, Why It is (2/3)π, and π is irrational..Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number e gives Rational or irrational Irrational, Number sets Irrational number, real number, Approximate value 2.71828182846.Source: OpenStax, College Algebra 2e, §6.1 Exponential Functions (e is an irrational number: its decimal goes on forever without repeating), https://openstax.org/books/college-algebra-2e/pages/6-1-exponential-functions (retrieved 2026-10-19)
- Number 0.1666... gives As a fraction 1/6, Decimal 0.16̅.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number ∛27/8 gives Rational or irrational Rational, As a fraction 3/8.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
- Number -22/7 gives Rational or irrational Rational, Decimal −3.1̅4̅2̅8̅5̅7̅, Number sets Rational number, real number.Source: OpenStax, Prealgebra 2e, §7.1 Rational and Irrational Numbers (a rational number can be written as a ratio of two integers; its decimal stops or repeats; square roots of whole numbers that are not perfect squares and π do not stop or repeat; Example 7.2: 0.583̅ and 0.475 are rational, 3.605551275… is irrational; Example 7.3: √36 = 6 is rational, √44 is irrational; Example 7.4: classifying counting, whole, integer, rational, irrational and real numbers), https://openstax.org/books/prealgebra-2e/pages/7-1-rational-and-irrational-numbers (retrieved 2026-10-19)
How it works
The calculator reads what you type exactly, as a + b·X, where a and b are fractions and X is one irrational part: √r or ∛r of a fraction r, π, 1/π, e or 1/e.
- When b = 0 the number is a fraction a = p/q, so it is rational.
- Otherwise it is irrational. X is irrational: √r of a fraction r in lowest terms is rational only when both its top and bottom are perfect squares (if √(p/q) = m/n, then p n² = q m², and with p/q in lowest terms p = m² and q = n²); ∛r likewise only for perfect cubes; π and e are irrational, and so are 1/π and 1/e. A rational number plus a nonzero rational multiple of an irrational number is irrational: if a + b·X = s were rational, X = (s − a) ÷ b would be rational too.
The calculator turns √r and ∛r into fractions whenever r is a square or a cube: √36 = 6, √(4/9) = 2/3, ∛(−8) = −2.
Any other root is written as the root of a whole number m with no square factor (no cube factor for ∛), so one number has one exact form, in whatever order it was typed. For r = p/q in lowest terms, √r = (1/q)√(pq) and ∛r = (1/q)∛(pq²), ∛(−m) = −∛m, and each square factor k² of the number under √ (cube factor k³ under ∛) comes out of the root as k: √8 = 2√2, √12 = 2√3, √(2/3) = (1/3)√6, ∛(−16) = −2∛2. So √8 − √2 and −√2 + √8 are both √2, and √(2/3) + √6 and √6 + √(2/3) are both (4/3)√6. The factors are found by dividing out every prime up to 100,000 and then taking out what is left when it is a square (a cube); this finds all of them when the number under the root is below 10¹⁵ (10²⁰ for ∛). Above that, a square factor of a prime over 100,000 can stay under the root (√1000250012300171, which is 100,003√100,019, stays as typed), and a sum or product of two such roots keeps the left one's number.
What you can type
- Numbers: whole numbers and decimals (
5,0.75,.5,-3.2), with commas only between groups of three digits (1,234.5;1,5is refused). No e-notation: e is the number e. - Repeating decimals: the repeating digits in brackets right after the decimal digits,
0.(3),0.58(3),1.2(34); or the decimal with three dots (...or…),0.333...,0.1666…,0.1212…. With dots, the repeating block is the shortest block of digits at the end that also stands just before itself (in 0.1666… it is 6; in 0.4545… it is 45). With no such block, as in 0.123…, the page asks you to type the repeating digits twice. The value of a decimal with whole part W, digits F after the point and then a repeating block R is (WFR − WF) ÷ (10^|F| × (10^|R| − 1)), where WFR and WF are the digits read as whole numbers: 0.58(3) = (583 − 58) ÷ 900 = 7/12. - Constants:
πorpi, ande. - Roots:
√xorsqrt(x)for the square root,∛xorcbrt(x)for the cube root, where x is a number, a constant, a root, or a bracket:√2,√(8/9),√0.25,∛-8is refused but∛(-8)= −2. The number under a root must be rational. - Arithmetic:
+,-or−,*,×or·,/or÷, and brackets. Multiplication and division go before addition and subtraction, from left to right. A number, constant, root or bracket may be followed by π, e, a root or a bracket with no sign between them, which multiplies:2π,3√2,2(1 + √3). This counts like ×, so1/2πis (1/2) × π; type1/(2π)for the other.
What the exact form can hold, and so what the page reads:
- sums and differences of a rational number and multiples of one irrational part:
1 + √2,π − 3,√8 − √2(√8 = 2√2, since 8 ÷ 2 is a square); - products and quotients by rational numbers;
- products of two square roots, or two cube roots, with no rational part added (
√2 × √8= 4,∛2 × ∛4= 2), and products and quotients of numbers a + b√r with the same √r (up to a square factor); - division by a + b√r, by b∛r, bπ, b/π, be or b/e;
- π × (1/π) and e × (1/e), and their quotients π/π and e/e.
Rules
No answer, with these messages:
- Anything that is not a number or expression as above: "Type a number such as 3/4, 0.75, 0.(3), √2, 2π or (1 + √5)/2."
- A comma that does not separate groups of three digits: "A comma in a number must separate groups of three digits, as in 1,000."
- Division by 0: "This divides by zero, so it is not a number."
- The square root of a negative number: "The square root of a negative number is not a real number."
- A root of an irrational number, such as √π: "The number under a root must be rational, such as √2 or √(4/9)."
- Two different irrational parts in one sum or product, such as √2 + √3 or π + 1/π: "This calculator handles one kind of irrational part at a time, such as 1 + √2, 3π/4 or ∛2 × ∛4."
- Any sum, product or quotient of π (or 1/π) with e (or 1/e): "No one knows yet whether sums and products of π and e, such as π + e, are rational."
- Three dots after digits that do not repeat: "The digits before the dots do not repeat. Type the repeating digits twice, as in 0.1212…, or in brackets, as in 0.(12)."
- At most 100 characters.
Output format
- Rational or irrational:
RationalorIrrational. - Why: for a rational number,
It equals p/q, a ratio of two integers.with p/q in lowest terms (q = 1 for a whole number, so 6 is6/1). OtherwiseIt is F, and m is not the square of a fraction, so its square root is irrational.(or… not the cube of a fraction, so its cube root is irrational.),It is F, and π is irrational.,It is F, and 1/π is irrational because π is.,It is F, and e is irrational.orIt is F, and 1/e is irrational because e is., where F is the exact value and m the whole number under its root (√44 givesIt is 2√11, and 11 is not the square of a fraction, …). - Exact value: a fraction is written
p/qin lowest terms or as a whole number. Otherwisea + bXora − |b|X, orbXalone when a = 0: the coefficient is left out when it is 1, written as a whole number, or as a fraction in brackets,(1/2)√5, with − before it when negative; X is√m,∛m,πore, with m the whole number under the root from "How it works" (√(2/3) is(1/3)√6, ∛(−2) is−∛2); 1/π and 1/e are writtenp/πorp/(qπ). Every minus sign is the true minus (−). - As a fraction: rational numbers only, p/q in lowest terms.
- Decimal: for a rational number, its exact decimal by long division: every digit when it ends within 60 decimal places; when a remainder repeats within 60 places, the repeating block with a combining overline (U+0305) after each of its digits, as in 0.16̅ or 3.1̅4̅2̅8̅5̅7̅; otherwise the first 60 places and
…. For an irrational number,≈and the approximate value below to 12 significant figures (shortest form, e-notation from 10²¹ or below 10⁻⁶). - Decimal type:
ends,repeats, orneither ends nor repeats(irrational). A fraction's decimal ends when its bottom in lowest terms has no prime factor but 2 and 5, also when it is longer than the 60 places shown (1/2⁶¹ ends after 61 places); otherwise it repeats. - Approximate value: the nearest 64-bit float to a + b·X, worked exactly with X to 120 decimal places (rounded down): √m and ∛m as whole-number roots, π and e from their first 120 decimal places. So typed digits that cancel the leading figures of X do not spoil the figures shown, unless they match X to more than about 100 decimal places: √2 − 1.41421356237 ≈ 3.09504880169e−12. Shown to 12 significant figures.
- Number sets, from OpenStax Example 7.4: a positive whole number is
Counting number, whole number, integer, rational number, real number; 0 isWhole number, integer, rational number, real number; a negative whole numberInteger, rational number, real number; another fractionRational number, real number; an irrational numberIrrational number, real number. - The answer sentence reads
Is x rational or irrational? R. W, with x as typed, R the verdict and W the reason.
Worked examples by hand
√2. 2 is not a perfect square, so √2 is irrational (≈ 1.41421356237).
√36 and √44 (OpenStax Example 7.3). 36 = 6², so √36 = 6, rational: a counting number, whole number, integer, rational and real. 44 is not a perfect square, so √44 is irrational; 44 = 2² × 11, so the page writes it 2√11.
0.583 with the 3 repeating (OpenStax Example 7.2). Typed 0.58(3): W = 0, F = 58, R = 3, so the value is (583 − 58) ÷ (100 × 9) = 525 ÷ 900 = 7/12, rational, decimal 0.583̅. 0.475 = 475/1,000 = 19/40, rational; its decimal ends.
The golden ratio. (1 + √5)/2 = 1/2 + (1/2)√5: 5 is not a square, so it is irrational, ≈ 1.61803398875.
√2 × √8. Both are pure square roots, so √2 × √8 = √16 = 4, rational.
2π/3. 2 × π ÷ 3 = (2/3)π, a nonzero rational multiple of π: irrational.
0.1666…. The last digit 6 equals the digit before it, so the block is 6: 0.16̅ = (16 − 1) ÷ (10 × 9) = 15/90 = 1/6.
∛27/8. ∛27 = 3 because 27 = 3³; ÷ 8 gives 3/8, rational.
−22/7. Rational, decimal −3.142857 with the six digits 142857 repeating: −3.1̅4̅2̅8̅5̅7̅. Close to −π, but a fraction.
Other questions people ask
How do you know if a number is rational or irrational?
A rational number can be written as a ratio of two integers, p/q; its decimal either ends or repeats. An irrational number cannot, and its decimal goes on forever without repeating (OpenStax Prealgebra 2e §7.1).
Is a repeating decimal rational?
Yes. Every repeating decimal is a fraction: 0.583 with the 3 repeating is (583 − 58) ÷ 900 = 7/12. Type it as 0.58(3) or 0.58333….
Is the square root of 2 rational or irrational?
Irrational. √n is rational only when n is a perfect square: √36 = 6 is rational, but √2 and √44 are irrational. For a fraction, √(p/q) in lowest terms is rational only when p and q are both perfect squares: √(4/9) = 2/3.
Is π rational or irrational?
Irrational: its decimal 3.14159… never ends or repeats. 22/7 and 3.14 are close to π but are rational, because they are fractions.
Is 0 rational?
Yes. 0 = 0/1, a ratio of two integers. It is a whole number and an integer as well.
Is a rational number plus an irrational number irrational?
Always. If r + x were rational for a rational r, then x would be that number minus r, which is rational. The same holds for a nonzero rational times an irrational, so 1 + √2 and 2π/3 are irrational.
Is π + e rational?
No one knows. Whether π + e or π × e is rational is an open question in mathematics, so the calculator does not answer it.