Skip to main content

Rational or Irrational Calculator

Enter any number — a decimal, a fraction like 3/4, a repeating decimal like 0.(3), or a constant like √2, π, or e — and get an exact classification with the p/q form, the decimal expansion, and a proof sketch. Everything runs 100% in your browser.

Classify a number

Type a number or expression, then press Classify.

Supported: integers, fractions (3/4), decimals (0.75), repeating decimals (0.(3) or 0.333…), percents (75%), √n, ∛n, π, e, φ, ln 2 — plus +, −, ×, ÷ and simple combinations like 2·π or π/2.

How the classification works

  • Integers and fractions a/b → rational, by definition.
  • Terminating decimals (0.75) → rational — they equal a fraction (3/4).
  • Repeating decimals (0.(3), 0.333…) → rational — every repeating decimal converts to an exact fraction (1/3).
  • √n and ∛n → rational only for perfect squares/cubes (√4 = 2); otherwise irrational.
  • π, e, φ, ln 2 → irrational (each proven mathematically).
  • A non-zero rational multiple of an irrational, or a rational ± an irrational, is still irrational.

Classic examples

0.75
= 3/4, terminating decimal
RATIONAL
0.333…
= 1/3, repeating decimal
RATIONAL
22/7
= 3.(142857), repeating — an approximation of π, not π itself
RATIONAL
√2
≈ 1.41421356237309504880…, never repeats
IRRATIONAL
π
≈ 3.14159265358979323846…, never repeats
IRRATIONAL
φ
≈ 1.61803398874989484820…, never repeats
IRRATIONAL

Frequently asked questions

What is a rational number?

A rational number is any number that can be written as p/q, where p and q are integers and q ≠ 0. Every integer, every fraction, every terminating decimal (like 0.75 = 3/4), and every repeating decimal (like 0.333… = 1/3) is rational.

What is an irrational number?

An irrational number cannot be written as p/q for any integers p and q. Its decimal expansion never terminates and never settles into a repeating pattern. Famous examples are √2, π, e, and the golden ratio φ.

Is 0.333… (0.3 repeating) rational or irrational?

Rational. The repeating decimal 0.333… equals exactly 1/3. In general, every repeating decimal can be converted to a fraction — for example, 0.142857 repeating equals 1/7, and 0.1666… equals 1/6.

Is the square root of 2 rational?

No — √2 is irrational; it cannot be written as a fraction p/q. This was proved by the ancient Greeks: if √2 = p/q in lowest terms, then p² = 2q² forces both p and q to be even, contradicting “lowest terms”.

Is pi (π) rational or irrational?

Pi is irrational. Johann Lambert proved in 1761 that no fraction p/q equals π, and its decimal expansion 3.14159265358979… never terminates or repeats. Note that 22/7 = 3.142857… is only an approximation of π — and 22/7 itself is rational.

How can you tell if a number is rational from its decimal expansion?

Look at the decimal digits: if they terminate (0.75) or eventually repeat the same block forever (0.1666… = 1/6), the number is rational. If the digits continue forever with no repeating pattern — like π = 3.14159265… — the number is irrational.

Free tool by NRTechStudio