We have already discussed the parallel between decimal expansions and continued fraction expansions of real numbers. We know that numbers with finite decimal expansion and finite continued fraction expansion must be rational. As we have seen, only numbers with finite continued fraction expansion are rational. However, decimal number expansions of rational numbers can be infinite. We know that an infinite decimal expansion of a rational number must be periodic, i.e., its terms become repeating at some point. In fact, any periodic decimal expansion represents a rational number. In this chapter we will see that a real number has infinite periodic continued fraction expansion if and only if it is a quadratic irrational. We will then be able to use the theory developed in proving this result to describe a procedure for factoring using continued fractions. We will also be able to apply the theory to find solutions to Pell’s equation.