In this paper an algorithm is presented that can be used to calculate the automorphism group of a finite transformation semigroup. The general algorithm employs a special method to compute the automorphism group of a finite simple semigroup. As applications of the algorithm all the automorphism groups of semigroups of order at most 7 and of the multiplicative semigroups of some group rings are found. We also consider which groups occur as the automorphism groups of semigroups of several distinguished types.