A novel numerical method to determine the numbers of teeth in the driver and driven gears in a compound gear train is presented as an algorithm for computer-aided design applications. A brief review of available methods for double-pair gear sets is made, and compared to the proposed algorithm from the viewpoints of precision, computational efficiency, and ease of programming. In comparison, we now have for the first time completely eliminated dependency on tables of prime factors and conjugate fractions, and/or the ingenuity of the designer (albeit an interesting intellectual challenge), and reduced the problem to a direct, straightforward calculation as a self-contained algorithm easily programmed by the designer himself. The arbitrary irrational value of 1/π is used in a numerical example; sixteen candidate gear sets are obtained having an overall ratio within ±5 micro-units. The triple-pair gear set design problem is considered, and an extended form of the algorithm derived. This allows, also for the first time, the systematic design of a triple-pair gear set, and obviates heuristic or cut and try methods. The same value of 1/π is used in an illustrative example, and the results presented in tabular form.