Several software clustering algorithms have been proposed in the literature, each with its own strengths and weaknesses. Most of these algorithms have been applied to particular software systems with considerable success. However, no algorithm has been shown to be superior in all cases. As a result, selecting a software clustering algorithm that is best suited for a specific software system remains a hard question to answer. At the same time, improving the effectiveness of an existing algorithm is a time-consuming process that would benefit from a methodology that allowed the early evaluation of an idea. In this paper, we first introduce a formal description template for software clustering algorithms. Based on this template, we propose a novel method for the selection of a software clustering algorithm for specific needs, as well as a method for software clustering algorithm improvement. The applicability and usefulness of the two methods introduced in this paper is demonstrated by applying them in four distinct case studies. Copyright © 2012 John Wiley & Sons, Ltd.