PurposeThis study aims to evaluate the service and crime prevention performance of law enforcement agencies in Taiwan’s municipalities. By analyzing these performances, the study seeks to improve the efficiency of police services through appropriate resource allocation, ultimately achieving enhanced crime prevention.Design/methodology/approachThe study utilized a two-stage data envelopment analysis (DEA) to construct performance metrics. In the first stage, the service performance of the police force was measured using the number of police officers and police stations as inputs and the number of patrols and temporary patrol boxes as outputs. In the second stage, crime prevention performance was assessed with the number of patrols and temporary patrol boxes as inputs and cases of violence, injury, intimidation and theft as outputs. Additionally, a truncated regression model was employed to analyze the impact of environmental variables such as per capita income, population density, proportion of the population with higher education and the unemployment rate on crime prevention performance.FindingsThe study found significant variations in both service and crime prevention performance across different municipalities. By identifying the most efficient and inefficient units, the analysis revealed critical insights into resource utilization and areas needing improvement. The regression analysis indicated that environmental factors such as higher per capita income, population density, education level and unemployment rate significantly affect crime prevention performance.Originality/valueThis research provides a novel approach to assessing police service efficiency and crime prevention effectiveness using a two-stage DEA model. By incorporating environmental variables through truncated regression, the study offers a comprehensive evaluation framework that can inform policy decisions and resource allocation strategies. This methodology not only highlights the performance metrics of law enforcement agencies but also underscores the influence of socioeconomic factors on crime prevention, contributing to the broader literature on public safety and resource management.