Social networks are made up of members in society and the social relationships established by the interaction between members. Community structure is an essential attribute of social networks. The question arises that how can we discover the community structure in the network to gain a deep understanding of its underlying structure and mine information from it? In this paper, we introduce a novel community detection algorithm NTCD (Community Detection based on Node Trust). This is a stable community detection algorithm that does not require any parameters settings and has nearly linear time complexity. NTCD determines the community ownership of a node by studying the relationship between the node and its neighbor communities. This relationship is called Node Trust, representing the possibility that the node is in the current community. Node Trust is also a quality function, which is used for community detection by seeking maximum. Experiments on real and synthetic networks show that our algorithm has high accuracy in most data sets and stable community division results. Additionally, through experiments on different types of synthetic networks, we can conclude that our algorithm has good robustness.