As a software product line evolves a significant management challenge is comparing existing products to each other or planned products. The approach to product comparison will vary according to its purposes. One solution includes the representation of a configured product as a weighted binary string where 1 represents a feature's presence, 0 represents its absence, and the weight represents the different levels of relative importance to the product that a feature is perceived to have. Relative importance values influence similarity matching so that the features considered important are the ones that primarily influence what is judged to be similar. A binary string similarity metric supports product comparison (a product similarity metric). For a product line that contains thousands of features the allocation of relative importance values is only practical when done automatically. This paper proposes a novel algorithm for automatically determining the relative importance of each feature. A feature tree can represent a product line in which a feature is a node in the tree and a relationship between features is an edge. A feature's relative importance is calculated as a function of local and global tree structural measures. The local measures are the number of input and output nodes to which a feature is connected and the variability property of each of these nodes. The global measure is the distance of the feature from the root node. A mobile phone worked example illustrates the feasibility of the algorithm.