There are two problems, unfair and too strict, with the utility function of the proposed incentive mechanisms for restraining the free-riding in peer-to-peer (P2P) networks. This paper is devoted to establish a new fair utility function to solve those problems. We absorb both the absolute contribution value and the physical performance of peers in our utility function and the absolute contribution value is divided into supply value and profit value. Besides, we take the time the user is in the system as a factor of a peer's utility. The mathematical modeling, Analytic Hierarchy Process (AHP), ...