Content-based retrieval for the comparative analysis of mammograms containing masses is presented as one part of a larger project on the development of a content-based image retrieval system for computer-aided diagnosis of breast cancer. In response to a query, masses characterized by objectively determined values related to specific mammographic features are retrieved from a database. The retrieved mammograms and their associated patient information may be used to support the radiologist's decision-making process when examining difficult-to-diagnose cases. We investigate the use of objective measures of shape, edge sharpness, and texture to retrieve mammograms with similar masses. Experiments were conducted with 57 regions (20 malignant and 37 benign) in mammograms containing masses. Three shape factors representing compactness, fractional concavity (Fcc), and spiculation index; Haralick's 14 statistical texture features; and four edge-sharpness measures were computed for use as indices for each of the mass regions. The feature values were evaluated with linear discriminant analysis, logistic regression, and Mahalanobis distance for their effectiveness in classifying the masses as benign or malignant. The three most effective features of Fcc, acutance (A), and sum entropy (F8) were selected from the 21 computed features based on the area under the receiver operating characteristics curve and logistic regression. Linear discriminant analysis with Fcc resulted in the highest sensitivity of 100% and specificity of 97%. The texture feature F8 and acutance A yielded average accuracies of 61% and 74%, respectively. A measure of retrieval accuracy known as precision was determined to be 91% when using the three selected features. However, the shape measure of fractional concavity on its own yielded a precision rate of 95%. The methods proposed should lead to an efficient tool for computer-aided diagnosis of breast cancer.