In collaborative filtering algorithm, similarity calculation method is undoubtedly the key of the entire recommender system, and determines the recommended quality of recommender system. In order to improve the precision of similarity calculation, a new similarity calculation method based on time decay is proposed. In this method, the similarity between the objective item and common-scored items is taken into account when calculating users similarity, and the influence of time information is taken into account when calculating users and items similarity. Experimental results shows that this method can effectively avoid the lack of the traditional similarity calculation method, and make the recommender system gain better recommendation result.