It is generally believed that semantic similarity between GO terms is critical in resolving semantic heterogeneousness when integrating heterogeneous biological databases. In this paper, we propose an approach to determine the semantic similarity of two GO terms based on both the locations of these terms in the GO graph and their semantic relations with their ancestor terms. First, we collect all their ancestor terms (including the specific terms) as sets TA and TB respectively. Second, we calculate the intersection of TA and TB, aggregate the largest semantic contribution of each term in the intersection, meanwhile compute the union of TA and TB, aggregate the minimum contribution of each term in the union. The ratio of these two sums is used to be the semantic similarity between the two GO terms, and the outcomes of our method are consistent with human perspectives.