We present a computational method for the analysis of optical coherence tomography (OCT) images to detect soft tissue sarcomas. The method combines the quantitative analysis of two aspects of information from the intensity A-lines of OCT images; one is the slope of the intensity A-line with dB unit, which is determined by the optical attenuation characteristics of tissue; the other is the standard deviation (SD) of the slope-removed intensity A-line, which is dependent on the tissue structural features. The method is tested with pilot experiments on ex vivo tissue samples of human fat, muscle, well differentiated liposarcoma (WDLS) and leiomyosarcoma. Our results demonstrate the feasibility of this quantitative method in the differentiation of soft tissue sarcomas from normal tissues. This study indicates that OCT can be a potential computer-aided means of automatically and accurately identifying resection margins of soft tissues sarcomas during surgical treatment.