As web-based online communities are rapidly growing, the agents in the communities need to know their measurable belief of trust for safe and successful interactions. In this paper, we propose a computational model of trust resulting from available feedbacks in online communities. The notion of trust can be defined as an aggregation of consensus given a set of past interactions. The average trust of an agent further represents the center of gravity of the distribution of its trustworthiness and untrustworthiness. Furthermore, we precisely describe the relationships among reputation, trust and average trust through concrete examples showing their computations. We apply our trust model to online social networks in order to show how trust mechanisms are involved in the rational purchasing decision-making of buyers and sellers, and we summarize our simulation results.