A fraction shown as p over q, illustrating rational numbers

What Are Rational Numbers? The Complete Guide with Examples

A rational number is any number you can write as p/q, where p and q are integers and q is not zero. That one sentence is the whole idea. The number 3/4 is rational. So is 7, so is −2/5, and so is 0.125. The number pi is not, because no fraction of two integers equals it exactly. Everything in this guide follows from that single rule, and by the end you will be able to test any number yourself in under a minute.

What Are Rational Numbers, Exactly?

The word “rational” comes from “ratio.” A rational number is a ratio of two integers. In the fraction p/q, the top number p is the numerator and the bottom number q is the denominator. The numerator can be any integer — positive, negative, or zero. The denominator can be any integer except zero. Mathematicians write the set of all rational numbers with the symbol Q, short for “quotient.”

Why can the denominator never be zero? Because division by zero has no meaning. The fraction 5/0 would ask: what number, multiplied by 0, gives 5? No number does that, because anything multiplied by 0 is 0. So 5/0 is undefined.

Many numbers do not look like fractions at first glance, but every one of them can be rewritten in p/q form:

NumberWritten as p/qRational?
3/43/4Yes
77/1Yes
−2.5−5/2Yes
00/1Yes
0.333…1/3Yes
π (pi)Cannot be written as p/qNo

The key point: a rational number does not have to look like a fraction. Whole numbers and decimals can be rational too, as long as some fraction of two integers equals them exactly. The test is always the same — can you write it as p/q with q not equal to zero?

Is 0 a Rational Number? Is Every Integer Rational?

Yes to both. Zero is a rational number because it can be written as 0/1: the numerator is the integer 0 and the denominator is the integer 1, which is not zero. Zero can be written as 0/2 or 0/100 too, but one example is all the test needs.

Every integer is rational for a similar reason: any integer can be written as itself over one. The number 5 is 5/1. The number −3 is −3/1. The number 100 is 100/1. Dividing by one changes nothing. The integers — …, −3, −2, −1, 0, 1, 2, 3, … — all sit inside the rational numbers, like a smaller set nested in a larger one.

People sometimes think rational numbers are only “messy” fractions like 7/8, and that tidy whole numbers are something else. In truth, whole numbers are the simplest rational numbers of all. The opposite of a rational number is an irrational number: a number that cannot be written as p/q. The square root of 2 and pi are the famous examples, covered in the decimals section below.

Decimals: Terminating, Repeating, and the Ones That Never End

Every rational number, written as a decimal, stops or repeats. A decimal that stops is called a terminating decimal: 1/2 equals 0.5, 3/4 equals 0.75, and 1/8 equals 0.125.

A repeating decimal never stops, but it falls into a pattern that repeats forever: 1/3 equals 0.333…, 2/3 equals 0.666…, 1/6 equals 0.1666…, and 1/7 equals 0.142857142857…, with the block 142857 repeating. The digits never end, but the pattern is perfectly predictable — and that predictability is what makes the number rational.

A simple rule decides whether a fraction terminates or repeats. Reduce the fraction to its simplest form, then look at the prime factors of the denominator: if the only prime factors are 2s and 5s, the decimal terminates; if any other prime factor appears, it repeats. Here are three worked examples.

First, 3/8. The denominator 8 factors as 2 × 2 × 2 — only 2s — so the decimal terminates: 3/8 = 0.375. Second, 7/20. The denominator 20 factors as 2 × 2 × 5 — only 2s and 5s — so the decimal terminates: 7/20 = 0.35. Third, 5/12. The denominator 12 factors as 2 × 2 × 3 — and there is a 3 — so the decimal repeats: 5/12 = 0.41666…, with the 6 repeating forever.

Now consider the numbers that never end and never repeat. Pi is the most famous: its decimal begins 3.14159… and the digits go on forever with no repeating block. No fraction of two integers equals pi exactly — 22/7 is a good approximation at about 3.142857 repeating, but it is not pi. Because pi cannot be written as p/q, it is irrational.

The square root of 2 is the other classic example. Its decimal begins 1.41421356… and, like pi, it continues forever without settling into a repeating pattern, so it is irrational too. The decimal test is absolute: if the digits stop, or if they repeat, the number is rational. If they run on forever with no repeating pattern, it is not.

Terminating, repeating and never-ending decimals compared
Stops, repeats — or never ends.

How to Tell If a Number Is Rational: A 3-Step Check

You do not need to memorise lists of rational and irrational numbers. This three-step check works on any number you meet, and it follows directly from the definition.

  1. Can it be written as a fraction of two integers? If the number is a fraction, a whole number, or a terminating decimal, the answer is yes right away: a whole number n is n/1, and a terminating decimal can be written over a power of ten — 0.25 is 25/100, which simplifies to 1/4.
  2. Does its decimal terminate or repeat? Look at the denominator’s prime factors as shown above. If the decimal stops, or a block of digits repeats, the number is rational. If the digits run on forever with no repeating block, it is irrational.
  3. Check the denominator. Make sure q is not zero: a zero denominator means the expression is undefined, not rational. This step is quick, but it is the one people forget.

Here is the check on two numbers. First, 0.125: it equals 125/1000, which simplifies to 1/8; the decimal stops after three digits, so it terminates; and the denominator 8 is not zero. All three steps pass, so 0.125 is rational — exactly 1/8.

Second, 0.121221222…. The digits follow a pattern — one 1, one 2, then one 1, two 2s, then one 1, three 2s — but the pattern grows instead of repeating a fixed block. The decimal never stops and no block repeats, so it fails the terminating-or-repeating test, and no p/q form exists. So 0.121221222… is irrational, even though its digits look organised. A growing pattern is not a repeating pattern, and that distinction is the whole test.

Rational Numbers on the Number Line

Every rational number sits at an exact point on the number line. The integers mark the whole-number positions, and the fractions fill in the gaps: 1/2 sits halfway between 0 and 1, −3/4 sits three-quarters of the way from 0 toward −1, and 5/4 sits a quarter of the way past 1.

The most surprising property of rational numbers on the number line is called density: between any two rational numbers, no matter how close together they are, there is always another rational number. Take 1/2 and 3/4: only a quarter apart, yet between them sits 5/8, which equals 0.625. Between 1/2 and 5/8 sits 9/16, which equals 0.5625. There is no end to this — you can zoom in forever and always find another rational number in the gap.

The trick for finding the number in the middle is to average the two numbers: add them and divide by two. For 1/2 and 3/4, the sum is 5/4, and half of that is 5/8 — exactly the number we found. The average of two rational numbers is always rational, so this trick never fails.

Density does not mean rational numbers cover the whole number line. The irrational numbers live there too — pi sits between 3.14 and 3.15, and the square root of 2 sits between 1.41 and 1.42. The rationals are packed tightly, yet the line still has room for the irrationals between them.

Three-step check for rational numbers: p over q, q not zero, decimal ends or repeats
Three quick checks settle it.

What You Can Do With Rational Numbers

Rational numbers are well behaved under arithmetic. Mathematicians say they are “closed” under addition, subtraction, multiplication, and division: combine two rational numbers and the answer is always another rational number. The only exception is division by zero, which is undefined for every number.

Add 1/2 and 1/3 and you get 5/6. Subtraction works the same way: 3/4 − 1/2 = 1/4. Multiplication is equally safe: 2/3 × 3/5 = 6/15, which simplifies to 2/5. And division, as long as you do not divide by zero, stays inside the set too: (3/4) ÷ (1/2) = 3/2, which is 1.5. Each operation on two fractions produces another fraction.

OperationExampleResult rational?
Addition1/2 + 1/3 = 5/6Yes
Subtraction3/4 − 1/2 = 1/4Yes
Multiplication2/3 × 3/5 = 2/5Yes
Division(3/4) ÷ (1/2) = 3/2Yes
Division by zero1/2 ÷ 0Undefined

This closure is why rational numbers are so useful in practice. A builder adding fractional measurements, a cook halving a recipe, or a shopkeeper working out a discount all stay inside the rational numbers at every step. It is also why fractions are taught before decimals in most school curricula: the fraction form keeps every result exact, while decimals sometimes have to be rounded.

Frequently Asked Questions

Is 0.5 a rational number?

Yes. The decimal 0.5 equals the fraction 1/2, and 1 and 2 are both integers with a non-zero denominator. Any terminating decimal is rational: 0.5 is 5/10, which simplifies to 1/2.

Is every fraction a rational number?

Every fraction of two integers, with a non-zero denominator, is rational — that is the definition. The one exception is a fraction with zero on the bottom, such as 4/0, which is undefined. Note that 22/7 is rational even though it approximates the irrational number pi; it is simply a rational number close to pi, not pi itself.

Is 1.5 a rational number?

Yes. The decimal 1.5 equals 3/2, a fraction of two integers, and it is a terminating decimal. The same goes for 2.25 (which is 9/4) and −0.8 (which is −4/5).

What is the difference between rational and irrational numbers?

A rational number can be written as p/q, with p and q integers and q not zero, and its decimal either terminates or repeats. An irrational number cannot be written as such a fraction, and its decimal runs on forever without repeating. Pi and the square root of 2 are irrational; 1/2, 0.75, and −7 are rational.

Are negative numbers rational?

Yes, as long as they fit the p/q rule. The number −3 equals −3/1, and −0.25 equals −1/4. The sign makes no difference. Negative decimals that terminate or repeat, such as −0.666…, are rational too.

That is the complete picture: a rational number is a ratio of two integers, its decimal terminates or repeats, and it stays rational through addition, subtraction, multiplication, and division. Next time you meet a new number, run the three-step check: try the fraction form, look at the decimal, and confirm the denominator is not zero. Fractions turn up in plenty of everyday places — converting land area units is one of them, since a cent of land is itself a fraction of an acre. Numbers also have a long story behind them, and reading a little history shows how the idea of fractions developed across civilisations; if you ever need to explain your working to someone else, writing a memorandum is a clear way to set out figures and reasoning in order.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *