Software industry is increasingly focusing on the improvement of software quality and team performance to survive in a competitive and rapidly growing environment. Previous studies reveal the importance of social and human factors in software engineering. Despite the importance of these personality factors, only a handful of empirical studies have quantitatively evaluated the impact of personality traits on software quality and effectiveness of software engineering teams. This study quantifies the abstract notion of trait-wise team homogeneity based on the Five-Factor Model (FFM). Additionally, this study also aims to measure its impact on team productivity and software quality. Trait-wise team homogeneity measures the Team Homogeneity Index (THI) for each of the five personality traits of FFM. Therefore, five new metrics i.e. Openness THI (O-THI), Conscientiousness THI (C-THI), Extraversion THI (E-THI), Agreeableness THI (A-THI), and Neuroticism THI (N-THI) are proposed. The utility of these five metrics is evaluated by conducting experiments in academic and industrial environments for three different phases of the Software Development Life Cycle (SDLC) i.e. analysis and design, implementation, and testing. During the analysis and design phase, it was observed that teams (composed of either students or professionals) with greater values of C-THI and A-THI produced better quality design models and teams with greater values of C-THI were more productive. In the implementation phase, teams with higher values of O-THI, C-THI, and E-THI were noticeably more productive and produced better quality code. For the testing phase, teams with greater values of C-THI and A-THI produced better quality test cases and were more productive. Results obtained so far indicate that the newly proposed five metrics -O-THI, C-THI, E-THI, A-THI, and N-THIappear to have the potential to aid managers and academics alike in building productive teams which can produce better quality software.