The easiest way to tell if a number is rational or not is to attempt to express it as a fraction. If you can, then the number is rational. If not, then the number is irrational. According to Math Is Fun, the formal definition of a rational number is "a number that can be in the form p/q, where p and q are integers and q is not equal to zero." All integers are rational numbers, because they can be written as a fraction (for example, the integer 8 = 8/1). For decimals, though, the process takes a few steps.
How to Tell That a Number Is RationalBy Leslie Renico