Use this free rational or irrational calculator to classify fractions, square roots, terminating and repeating decimals and multiples of pi — with the reason explained.

Rational Irrational Calculator

Classify any fraction, root or decimal as rational or irrational — and get the reason, not just the label.

Free to use No sign-up Instant result Private — runs in your browser

Enter your values

Fill in the fields below — the result appears with every step shown.

Shown on the printed, PDF and PNG copies of your result. Leave blank to stay anonymous.

Enter a valid value for number type.

Fraction p/q, a square root, a terminating or repeating decimal, or a multiple of pi.

Enter a valid value for numerator p / decimal value / pi coefficient.

Enter a valid value for denominator q.

Enter a valid value for radicand (for square root).

Local browser calculation

Review your inputs and the tool’s supported scope before using the result.

Calculator loading… If this message stays, this view is not running the calculator's script — open this file in a full browser tab, then press Calculate.

Your result will appear here

Enter your values above, then press Calculate — or press Enter in any field.
TinyExe Rational Irrational Calculator tinyexe.comFree online calculators

TinyExe · Rational Irrational Result

Calculated locally in your browser

Calculated on
—

–
—

Name

—

Number type

—

Numerator p / decimal value / pi coefficient

—

Denominator q

—

How this was calculated

    What to do next

      TinyExe · tinyexe.com — Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      TinyExe PDF & PNG exports carry the TinyExe logo and tinyexe.com header & footer.

      Runs 100% in your browser — your numbers never leave this tab; nothing is uploaded or stored.

      Embed this tool

      Add this Rational Irrational Calculator to your own page — copy the code below and paste it where you want the tool to appear.

      The embed loads the live calculator in a frame, so it stays up to date automatically. Choose a width, check the code, then copy it. When you publish on WordPress, keep the src pointing at your live tool URL.

      Works in WordPress (Custom HTML block), HTML pages, and most site builders.

      The short answer

      The number you entered is classified as rational by this calculator, which encodes rational as one and irrational as zero in its headline result. Fractions of integers, terminating decimals and repeating decimals are always rational, while the square root of a non-square integer and non-zero multiples of pi are irrational.

      • Rational numbers are exactly the ratios p/q of integers, q not zero
      • sqrt(n) is rational only when n is a perfect square
      • Repeating and terminating decimals are always rational

      Classification quick reference

      Reference values for this calculator.

      NumberTypeReason
      7/8RationalRatio of integers
      0.75RationalTerminating decimal = 3/4
      0.333...RationalRepeating decimal = 1/3
      sqrt(2)IrrationalNon-square radicand
      sqrt(144) = 12RationalPerfect square
      3 x piIrrationalNon-zero multiple of pi

      The formula

      The exact formula this calculator uses — every variable in it is explained in the card below.

      The formula

      Rational = expressible as p/q with integers p, q and q not 0 (includes integers, terminating and repeating decimals) · Irrational = cannot be so expressed (non-terminating, non-repeating decimals such as sqrt of a non-square integer, and non-zero multiples of pi)

      Ideas enhancement: instead of a bare label, the tool explains WHY the number classifies that way (perfect-square test for roots, the fraction disguise for repeating decimals), which is the part students are actually marked on.

      Worked examples

      Worked examples with the full working shown — try them in the calculator to check.

      Example 1

      A plain fraction

      Fraction 3/4

      CalculationSteps
      3/4 is a ratio of integers, so it is rational — headline 1 (rational).3/4 = 0.75 is rational.

      Result

      Example 2

      The famous root

      Square root of 2

      CalculationSteps
      2 is not a perfect square, so sqrt(2) = 1.414214... never terminates or repeats — headline 0 (irrational).sqrt(2) is irrational.

      Result

      Example 3

      A perfect-square root

      Square root of 144

      CalculationSteps
      144 = 12^2, so sqrt(144) = 12 exactly, an integer — headline 1 (rational).sqrt(144) = 12 is rational.

      Result

      How to use this calculator

      Step 1

      Choose the type of number you are classifying: a fraction, a square root, a terminating decimal, a repeating decimal, or a multiple of pi.

      Step 2

      Enter the values it asks for — numerator and denominator, the radicand, or the decimal / pi coefficient.

      Step 3

      Read the classification: 1 means rational, 0 means irrational.

      Step 4

      Read the "Why" detail — in class and in proofs, the reason matters more than the label.

      Step 5

      For a square root, check the perfect-square rule yourself: if the radicand is 1, 4, 9, 16, 25... the root is an integer and rational.

      In short: A rational number can be written as a fraction of two integers; an irrational number cannot, and its decimal never terminates or repeats.

      Frequently asked questions

      Is 0 rational or irrational?

      Rational. Zero is 0/1, a ratio of integers, and it is also an integer — every integer is rational because it can be written over 1.

      Is a repeating decimal really a fraction?

      Yes. Any eventually repeating decimal converts to a fraction: 0.333... = 1/3, 0.142857142857... = 1/7. The conversion multiplies by a power of ten to shift the repeating block and subtracts.

      Is sqrt(9) irrational because it is a square root?

      No — sqrt(9) = 3 exactly, an integer, so it is rational. Only roots that do not come out whole (of non-perfect-square integers) are irrational.

      Is pi over 2 irrational?

      Yes. Dividing an irrational number by a non-zero rational keeps it irrational: if pi/2 were a fraction p/q, then pi would be 2p/q, also a fraction — which it is not.

      Can a number be both rational and irrational?

      No. The two sets are exact opposites and together cover all real numbers. (Imaginary and complex numbers sit outside this classification entirely.)

      About this calculator

      Every real number is one of two kinds. Rational numbers can be written exactly as a fraction of two integers — which includes all integers, all terminating decimals and all decimals that settle into a repeating block. Irrational numbers cannot: their decimals run forever without repeating, like pi and the square root of 2.

      The definition is the test: a number is rational exactly when it equals p/q for integers p and q with q not zero. That is why integers qualify (7 = 7/1), why terminating decimals qualify (0.75 = 75/100 = 3/4), and why repeating decimals qualify — the repeating block can always be captured by a fraction, as 0.333... = 1/3 shows.

      Square roots split cleanly on the perfect-square rule. If the radicand is a perfect square (1, 4, 9, 16, 25, ...), the root is an integer and rational. If not, the root is provably irrational — the classic contradiction proof for sqrt(2) extends to every non-square integer. This is the single most tested fact in this topic.

      Pi multiples follow a closure rule: a non-zero rational multiple or quotient of an irrational number is still irrational, because otherwise the original number could be rebuilt as a fraction. So 3pi and pi/2 are irrational, while 0 x pi = 0 is rational — the exception that tests whether you are applying the rule or just pattern-matching.

      Use it for algebra homework and exam questions ("state whether each number is rational or irrational, giving a reason"), for checking whether a root simplifies to a whole number, and for settling arguments about famous edge cases like 0.333... or 22/7 (a rational approximation to pi, not pi itself).

      How to calculate it yourself

      Step 1

      Ask first: can this number be written as p/q with whole-number p and q? If yes, it is rational — stop.

      Step 2

      For a decimal, look at its tail: terminates or repeats a block forever means rational; neither means irrational.

      Step 3

      For a square root, check whether the radicand is a perfect square (1, 4, 9, 16, 25, 36...).

      Step 4

      Perfect square means the root is an integer: rational. Non-square means irrational.

      Step 5

      For multiples of pi or e, any non-zero rational coefficient keeps the number irrational.

      Real-life examples

      the 0.333 argument

      A student insists 0.333... "goes on forever, so it must be irrational" in a class discussion.

      Forever is not the test — repeating is. 0.333... = 1/3 exactly, so the calculator classifies it rational (headline 1). A decimal must fail to repeat, not merely fail to end, to be irrational.

      0.333... is rational: it equals 1/3.

      diagonal of a square

      A carpenter measures the diagonal of a 1 m square panel and the tape reads about 1.414 m — the calculator input behind that number is sqrt(2).

      By Pythagoras the diagonal is sqrt(1^2 + 1^2) = sqrt(2) = 1.414214..., classified irrational (headline 0): no fraction of integers gives it exactly, which is why the tape can only ever show an approximation.

      The true diagonal, sqrt(2) m, is irrational.

      Ideas & use cases

      • Build the classic trap list and test each: 22/7 (rational — it is a fraction), pi (irrational), sqrt(9) (rational), 0.1010010001... with a growing pattern (irrational — it never settles into a repeating block).
      • Use the perfect-square rule as a simplification check: before simplifying any root, run its radicand here — a rational result means the root comes out whole.
      • Challenge the closure rules: classify 2 x sqrt(2), sqrt(2)/2 and sqrt(2) - sqrt(2) using the reasoning in the Why detail, then verify the pattern with fractions you construct.

      Limitations & sources

      • Classifies the five input forms offered. It proves irrationality only for the classic cases (non-square integer roots, pi multiples); a typed arbitrary decimal is taken at face value as terminating or repeating according to the type you select.

      Sources: Standard real-number classification (rational = p/q, q != 0): any algebra text, e.g. OpenStax Algebra and Trigonometry, real numbers chapter

      Rational Irrational Calculator · TinyExe calculator suite Free to use · No sign-up · Instant results