We present a three-dimensional (3-D) computational method to detect soft tissue sarcomas with the goal of automatic surgical margin assessment based on optical coherence tomography (OCT) images. Three parameters are investigated and quantified from OCT images as the indicators for the tissue diagnosis including the signal attenuation (A-line slope), the standard deviation of the signal fluctuations (speckles), and the exponential decay coefficient of its spatial frequency spectrum. The detection of soft tissue sarcomas relies on the combination of these three parameters, which are related to the optical attenuation characteristics and the structural features of the tissue. Pilot experiments were performed on ex vivo human tissue samples with homogeneous pieces (both normal and abnormal) and tumor margins. Our results demonstrate the feasibility of this computational method in the differentiation of soft tissue sarcomas from normal tissues. The features of A-line-based detection and 3-D quantitative analysis yield promise for a computer-aided technique capable of accurately and automatically identifying resection margins of soft tissue sarcomas during surgical treatment.