The nth partial sum of a geometric sequence can be calculated using the first term a1 and common ratio r as follows: Sn=a1(1−rn)1−r. The infinite sum of a geometric sequence can be calculated if the common ratio is a fraction between −1 and 1 (that is |r|<1) as follows: S∞=a11−r. If |r|≥1, then no sum exists.