For a p-group P, pa prime, there are two versions of the Thompson subgroup of P, namely the elementary version Je(P)and the non-elementary version J(P). This paper describes algorithms for calculating these two subgroups. Depending on P, these algorithms are effective for groups of order up to p30. By modifying these algorithms we also produce algorithms for K(P), a further characteristic subgroup also introduced by Thompson , and characteristic subgroups D(P)and De(P)introduced by Glauberman and Solomon . Sample calculations using these algorithms are discussed with an accompanying file giving details of these calculations, along with the code for the algorithm.