Skip to content
CalculatorAtlas

Rational or Irrational Calculator

Tested

Whether the k-th root of a whole number is rational.

Tested, not yet published. The formula for this calculator is implemented and passes its automated checks. This page stays non-indexable until it is reviewed and published.

Results

Enter your values and press Calculate. Results appear here.

  • • Result

Quick answer

The k-th root of a whole number x is rational exactly when x is a perfect k-th power. The square root of 144 is 12, so it is rational; the square root of 2 is irrational.

Enter a whole number and the root index. The calculator says whether the root is rational and gives the value when it is.

Related tools: Fraction Calculator: Add, subtract, multiply and divide fractions with simplified and mixed-number results. Ratio Calculator: Simplify a ratio of two whole numbers. Random Number Generator: Random integers in a range, optionally repeatable with a seed.

How to use the Rational or Irrational Calculator

  1. Enter whole number (a whole number, between 0 and 1000000000000000).
  2. Enter root index (a whole number, between 2 and 20). It starts at 2.
  3. Press Calculate to see the result, and use Reset to start again.
Inputs of the Rational or Irrational Calculator
InputWhat to enterAllowed values
Whole numberA whole number≥ 0, ≤ 1000000000000000
Root indexA whole number≥ 2, ≤ 20, starts at 2

Formula and method

Formula

ⁿ√x is rational exactly when x is a perfect k-th power

IEEE-754 double precision; shown to the decimals indicated.

A root of an integer is either an integer or irrational.

Worked examples

These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.

Example 1

Inputs: Whole number = 144; Root index = 2.

Results of example 1
ResultValue
ResultRational (equals 12)
Value12

Example 2

Inputs: Whole number = 2; Root index = 2.

Results of example 2
ResultValue
ResultIrrational
Value1.41421356

Example 3

Inputs: Whole number = 27; Root index = 3.

Results of example 3
ResultValue
ResultRational (equals 3)
Value3

The first line is the headline result (result). Below it the rational or Irrational Calculator lists value, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.

Why no other case works

If a k-th root of an integer is rational, it must be an integer (by the rational root theorem), so the root is rational only for perfect powers. √2, √3, √5 and ∛2 are therefore irrational.

Other irrational numbers

π and e are irrational but are not roots of integers; they are transcendental. This tool covers roots of whole numbers only.

How the result changes with whole number

Holding every other input at the first worked example, this table changes only whole number. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.

How the result changes with whole number
Whole numberResultValue
72Irrational8.48528137
144Rational (equals 12)12
288Irrational16.97056275
576Rational (equals 24)24

What happens with invalid input

These messages are produced by the calculator itself, so you know what to fix.

  • Whole number: entering "-1" shows "Whole number must be at least 0." beside that field and no result.
  • Root index: entering "1" shows "Root index must be at least 2." beside that field and no result.

Choosing between the Rational or Irrational Calculator and similar calculators

Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.

Choosing between the Rational or Irrational Calculator and similar calculators
CalculatorYou enterIt returns
[Fraction Calculator](/math/fraction-calculator/)numerator 1, denominator 1 and operationResult
[Ratio Calculator](/math/ratio-calculator/)first number and second numberSimplified ratio
[Random Number Generator](/math/random-number-generator/)minimum, maximum and how manyRandom numbers
[Area Calculator](/math/area-calculator/)shape and aArea
[Scientific Calculator](/math/scientific-calculator/)expression and angle modeResult

Assumptions and limitations

  • Applies to roots of non-negative integers

If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for whole number and root index to confirm this.

Frequently asked questions

Is 0 rational?

Yes. Zero can be written as 0/1, so it is a rational number.

Is √16 rational?

Yes. The square root of 16 is 4, a whole number.

Is 0.333… rational?

Yes. A repeating decimal such as 0.333… equals the fraction 1/3.

What does the Rational or Irrational Calculator calculate?

Whether the k-th root of a whole number is rational. It returns Result and Value.

What formula does the Rational or Irrational Calculator use?

ⁿ√x is rational exactly when x is a perfect k-th power. A root of an integer is either an integer or irrational.

What do I need to enter in the rational or Irrational Calculator?

You enter Whole number and Root index.

How is the result rounded or limited?

IEEE-754 double precision; shown to the decimals indicated. Applies to roots of non-negative integers.

What is an example of a rational or Irrational result?

With whole number 144 and root index 2, the result is Rational (equals 12).

Where does the method come from?

The method follows: OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions (real numbers; rational and irrational numbers); Rational root theorem: a rational root p/q of an integer polynomial has p dividing the constant term and q dividing the leading coefficient.

Sources

  • OpenStax, Algebra and Trigonometry 2e (Rice University): exponents, radicals, logarithms and inverse trigonometric functions (real numbers; rational and irrational numbers)
  • Rational root theorem: a rational root p/q of an integer polynomial has p dividing the constant term and q dividing the leading coefficient

Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.