# Rational or Irrational Calculator

URL: https://speedycalculator.com/calculators/math/rational-or-irrational/
Last updated: 2026-10-30

> The rational or irrational calculator decides whether a number you type – a fraction, decimal, repeating decimal, square or cube root, π or e – is rational or irrational, and explains why.

## Inputs

- Number to be tested

## Results

- Rational or irrational?
- Why
- Real or complex
- Sign

## Formula

```
Rational: can be written as p/q with integers p, q (q ≠ 0)
√n is rational only if n is a perfect square
```

## Explanation

Rational numbers have terminating or repeating decimals; irrational numbers, such as √2 and π, go on forever without repeating. The proof that √2 is irrational is one of the oldest in mathematics.

### How to use the Rational or Irrational Calculator

- **Number to be tested**

Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.

### How it works

Fractions, terminating decimals and repeating decimals (written like 0.1(6)) are rational. √n and ∛n are tested for perfect squares and cubes. π, e and φ are known to be irrational.

## Worked example

Inputs — Number to be tested: sqrt(8).

Results — **Rational or irrational? = Irrational**; Why = 8 is not a perfect square, so √8 is irrational.; Real or complex = Real number; Sign = Positive.

## Key terms

- **Rational number**: A ratio of two integers.
- **Irrational number**: A real number that is not rational.

## FAQ

**Is 0.333… rational?**
Yes – it equals 1/3.

**Is √16 rational?**
Yes, it equals 4.

**Is π rational?**
No – π is irrational (and transcendental).

**Can the sum of two irrationals be rational?**
Yes: √2 + (−√2) = 0.


## Sources

- [OpenStax – Prealgebra 2e](https://openstax.org/details/books/prealgebra-2e)
- [Wolfram MathWorld – Irrational number](https://mathworld.wolfram.com/IrrationalNumber.html)
