ABSTRACT Previous research on the factors affecting knowledge sharing has focused on the relationships between a limited number of variables. However, it is unclear how these factors interact with each other and jointly influence knowledge-sharing intentions. Drawing on social cognitive theory (SCT), this paper performs a decision tree analysis to predict the knowledge-sharing intentions of social question-and-answer (Q&A) community members based on a multitude of environmental and individual factors, including a sharing culture, motivations, and individual characteristics. Data from 1,007 users were collected, and a regression tree model was built using the R package rpart. The results show that high levels of knowledge-sharing intentions occur among those who strongly enjoyed sharing and who perceived fairness within the community. For those who had a moderate or low level of enjoyment, their willingness to share knowledge was jointly affected by the sharing culture and extrinsic motivations.