MathIt Blog

Rational numbers and irrational numbers explained: how to tell them apart

By Laura Bennett, MathIt · Published · 9 min read
A round cheese pizza cut into eight equal slices on a wooden board, with an empty white plate, a spool of red string, colorful blank fraction pieces and a yellow pencil on a sheet of paper on a light table.

What is a rational number?

A rational number is any number that can be written as a fraction p/q, where p and q are integers and q is not 0. Whole numbers, negative integers, fractions, terminating decimals such as 0.75 and repeating decimals such as 0.333… are all rational. A number whose decimal never ends and never repeats, such as √2 or π, is irrational.

Key takeaways

  • A rational number is a number that can be written as p/q, where p and q are integers and q is not 0, so 5, −5, 0, 3/4 and 0.75 are all rational.
  • An irrational number is a real number that cannot be written as a ratio of two integers, and its decimal form never ends and never repeats, as with √2 = 1.41421… and π = 3.14159….
  • Every terminating decimal and every repeating decimal is rational, so 0.272727… can be rewritten as 27/99, which simplifies to 3/11.
  • The square root of a whole number is rational only when the number is a perfect square, so √9 = 3 is rational while √2, √3 and √5 are irrational.
  • The fraction 22/7 is rational and only approximates π, because 22/7 = 3.142857142857… repeats while π = 3.14159… never repeats.

Your grade 8 child's homework asks whether 0.333…, √9 and π are rational, and the answer key says only the last one is not. Rational numbers are the numbers you can write as a fraction of two integers, and irrational numbers are the ones you cannot, however long you try. One definition and five quick tests are enough to sort any number you meet, and they also explain why a calculator never shows the end of π.

What is a rational number?

A rational number is a number that can be written as a fraction p/q, where p and q are integers and q is not 0. OpenStax Prealgebra 2e, section 7.1 puts it in one line: "A rational number is a number that can be written as a ratio of two integers." The word comes from "ratio", so the guide to fractions is the right starting point if p/q feels rusty.

The same OpenStax section defines the other side: "An irrational number is a number that cannot be written as the ratio of two integers. Its decimal form does not stop and does not repeat." Together the two groups make up the real numbers, every point on the number line.

In US schools the topic sits in grade 8. Common Core standard 8.NS.A.1 reads: "Know that numbers that are not rational are called irrational. Understand informally that every number has a decimal expansion; for rational numbers show that the decimal expansion repeats eventually, and convert a decimal expansion which repeats eventually into a rational number."

The number-set family: ℕ, ℤ, ℚ and ℝ

The number sets fit inside each other like nested boxes. The natural numbers ℕ (1, 2, 3 …) sit inside the integers ℤ, which add 0 and the negatives such as −5 (see negative numbers explained). The integers sit inside the rational numbers ℚ, which add fractions and decimals such as 3/4 and 0.75, and ℚ sits inside the real numbers ℝ.

The irrational numbers fill the part of ℝ that lies outside ℚ. The letter ℚ stands for "quotient", the answer to a division, which Wolfram MathWorld traces to the German word Quotient. Many US textbooks also name the whole numbers (0, 1, 2, 3 …) as a step between ℕ and ℤ.

Nested rounded rectangles for the number sets: ℕ holds 1, 2 and 3; ℤ adds −5 and −1; ℚ adds 3/4, 0.75 and −2/3; the outer ℝ band outside ℚ holds the irrational numbers √2 and π.
Nested rounded rectangles for the number sets: ℕ holds 1, 2 and 3; ℤ adds −5 and −1; ℚ adds 3/4, 0.75 and −2/3; the outer ℝ band outside ℚ holds the irrational numbers √2 and π.

How to tell if a number is rational, step by step

A number is rational if any one of the first four tests below says yes; only a number that fails all of them is irrational. Work through the tests in order and stop at the first yes.

  1. Look for a fraction of integers. A number already written as p/q with integers on top and bottom, such as 7/3 or −2/5, is rational. A whole number counts too, because 4 = 4/1 and 0 = 0/1.
  2. Check for a decimal that ends. A terminating decimal is rational, because it is a fraction over 10, 100 or 1,000: 0.75 = 75/100 = 3/4, and 2.5 = 25/10 = 5/2.
  3. Check for a decimal that repeats. A decimal with a block of digits that repeats forever is rational, so 0.333… = 1/3 and 0.1666… = 1/6. Common Core 7.NS.A.2d asks students to "convert a rational number to a decimal using long division; know that the decimal form of a rational number terminates in 0s or eventually repeats."
  4. Test square roots for perfect squares. The square root of a whole number is rational only when the number is a perfect square: √9 = 3 and √49 = 7 are rational, while √2, √3 and √10 are irrational.
  5. Recognize the famous irrationals. Pi (π = 3.14159…), e (2.71828…) and any decimal built to never repeat, such as 1.010010001…, are irrational.
Play free in your browserSquare NumbersGrade 4–6

The part people get wrong: 22/7 and 0.333…

The fraction 22/7 is rational, while π is irrational, even though school often uses 22/7 for π. Long division gives 22/7 = 3.142857142857…, with the block 142857 repeating, while π = 3.14159… never settles into a block. The two numbers differ from the third decimal place, which is why 22/7 is an approximation (the guide to circumference and area of a circle uses both).

The decimal 0.333… looks endless, so many people call it irrational, but it is exactly 1/3. A decimal that goes on forever is rational as long as it repeats. Only a decimal that both never ends and never repeats is irrational.

Rational vs irrational numbers: examples side by side

Rational and irrational numbers are easiest to tell apart when you see the same tests applied to common examples. Each row of the comparison gives the number, the verdict, the reason and the fraction where one exists.

NumberRational?WhyWritten as a fraction
0YesAn integer0/1
−5YesAn integer−5/1
0.75YesTerminating decimal3/4
0.333…YesRepeating decimal1/3
√9Yes9 is a perfect square, √9 = 33/1
√2No2 is not a perfect squareNone
πNoDecimal never ends or repeatsNone (22/7 is close)
22/7YesAlready a ratio of integers22/7
1.010010001…NoThe pattern grows, so no block repeatsNone

Which test to try first

The fastest test depends on how the number is written. A fraction or an integer is rational on sight, a decimal needs the "ends or repeats" check, and a square root needs the perfect-square check from the guide to square roots.

The last row in the comparison is the trickiest. The decimal 1.010010001… has a clear pattern (one more 0 each time), but no single block of digits repeats forever, so it is irrational.

How to turn a repeating decimal into a fraction

A repeating decimal becomes a fraction when you multiply away the repeating part. Take x = 0.272727…, where the block "27" has 2 digits, so multiply by 100.

  • 100x = 27.272727…
  • x = 0.272727…
  • Subtract: 99x = 27, so x = 27/99.

The fraction 27/99 simplifies by dividing top and bottom by 9, which gives 3/11; the guide on how to simplify fractions covers that step. Check by long division: 3 ÷ 11 = 0.272727…, the decimal you started with.

A decimal that starts repeating after a delay needs one more step. For x = 0.1666…, 10x = 1.666… and 100x = 16.666…, so 100x − 10x = 90x = 15 and x = 15/90 = 1/6. The long division behind these checks is a grade 6 skill, and the guide to decimals explains place value after the decimal point.

Free printable worksheetDivision — 6th GradersWorksheet · PDF

Practice rule: the block length sets the nines

A block of n repeating digits that starts right after the decimal point goes over n nines. So 0.777… = 7/9, 0.272727… = 27/99 and 0.123123… = 123/999 = 41/333.

Irrational numbers have no fraction form, so you place them with a decimal approximation. Common Core 8.NS.A.2 asks students to "use rational approximations of irrational numbers to compare the size of irrational numbers" and gives the example of showing that √2 is "between 1 and 2, then between 1.4 and 1.5". The check is quick: 1.4² = 1.96 and 1.5² = 2.25, so √2 lies between them.

A number line from 0 to 4 with the rational numbers 1/2 (0.5) and 7/3 (about 2.333) marked in blue and the irrational numbers √2 (about 1.414), e (about 2.718) and π (about 3.142) marked in coral.
A number line from 0 to 4 with the rational numbers 1/2 (0.5) and 7/3 (about 2.333) marked in blue and the irrational numbers √2 (about 1.414), e (about 2.718) and π (about 3.142) marked in coral.

How to check your progress with rational numbers

Five short questions show whether you can sort numbers or are guessing. Answer them without notes, then compare.

  • Integers: is −12 rational? Yes, because −12 = −12/1.
  • Square roots: which of √16, √20 and √25 are rational? √16 = 4 and √25 = 5 are rational; √20 is irrational because 20 is not a perfect square.
  • Repeating decimals: write 0.444… as a fraction. The answer is 4/9.
  • Two-digit blocks: write 0.454545… as a fraction. The answer is 45/99 = 5/11.
  • Ordering: put 7/3, √5 and 2.2 in order. √5 ≈ 2.236 and 7/3 ≈ 2.333, so the order is 2.2, √5, 7/3.

A ten-minute self-test

A ten-minute self-test mixes one number of each kind: a fraction, a terminating decimal, a repeating decimal, a square root and π. Say the verdict and the reason out loud before you write anything, then check the reason against the five tests.

Getting the verdict right but the fraction wrong points to arithmetic, not to the idea of rational numbers. Quick recall of the perfect squares up to 144 and of the nines rule removes most of those slips, and adults rebuilding these facts can use the math game for adults in short daily rounds.

Common mistakes and edge cases

Four mistakes cause most wrong answers about rational numbers, and each has a short fix.

  • Calling every endless decimal irrational: 0.333… goes on forever but equals 1/3. Ask whether the digits repeat; whether they end does not decide it.
  • Treating 22/7 or 3.14 as π: both are rational approximations. Write "π ≈ 3.14" with the ≈ sign, which keeps the difference visible.
  • Calling every square root irrational: √9, √36 and √100 are whole numbers. Check for a perfect square first.
  • Forgetting zero and negatives: 0 = 0/1 and −7 = −7/1 are rational. The only banned value is a denominator of 0.

Edge case: sums and products of irrational numbers

A rational number plus an irrational number is always irrational, so 3 + √2 and π − 1 are irrational. A nonzero rational number times an irrational number is irrational as well, so 2π is irrational.

Two irrational numbers can combine into a rational one. √2 × √2 = 2, and √2 + (−√2) = 0, both rational. The reason √2 itself is irrational is a classic proof: if √2 = p/q in lowest terms, then p² = 2q², so p is even; writing p = 2k gives q² = 2k², so q is even too, which contradicts "lowest terms". MathWorld adds that irrational numbers "have decimal expansions that neither terminate nor become periodic."

Your rational numbers checklist and next steps

  • Fraction form: can you write the number as p/q with integers and q ≠ 0? Then it is rational.
  • Decimal form: does the decimal end or repeat? Then it is rational.
  • Square roots: is the number under the root a perfect square? Only then is the root rational.
  • Approximations: treat 22/7 and 3.14 as stand-ins for π, never as π.
  • Repeating decimals: put a block of n repeating digits over n nines, then simplify.
  • Back-check: convert your fraction back with long division to confirm it matches.

The free square numbers game in the browser drills the perfect squares behind the square-root test, with no sign-up.

Practise it in the MathIt app

About 90 math games with adaptive difficulty, daily practice and 2–5 player battles — free on iOS and Android.

Download on the App StoreGet it on Google Play

MathIt is a free app for iOS and Android with about 90 game types, adaptive difficulty and short daily practice that keeps the square numbers, fractions and division behind these tests quick.

Frequently asked questions

What is an irrational number?

An irrational number is a real number that cannot be written as a fraction of two integers. Its decimal form never ends and never falls into a repeating block of digits. The best-known examples are √2 = 1.41421…, π = 3.14159… and e = 2.71828…, and the square root of any whole number that is not a perfect square.

Is 0 a rational number?

Zero is a rational number because it can be written as the fraction 0/1, with integers on top and bottom and a bottom that is not 0. Zero can also be written as 0/5 or 0/−8. The opposite form 1/0 is not a number at all, because division by zero is undefined.

Is pi a rational number?

Pi is not a rational number; π is irrational. Its decimal form, 3.14159265…, never ends and never repeats, so no fraction of two integers equals π exactly. Fractions such as 22/7 and 355/113 are rational approximations of π that are close enough for everyday measuring.

Is 4 a rational number?

The number 4 is rational because it can be written as the fraction 4/1. Every integer is rational in the same way, so −4, 0 and 400 are rational too. The square root √4 is also rational, because 4 is a perfect square and √4 = 2.

Is a repeating decimal a rational number?

A repeating decimal is always a rational number. A decimal such as 0.333… or 0.272727… can be rewritten as a fraction of two integers: 0.333… = 1/3 and 0.272727… = 27/99 = 3/11. Only a decimal that never ends and never repeats is irrational.

Similar topics

All articles →