INTRODUCTION: The purpose of this in vitro study was to compare the accuracy of the new electronic apex locator Raypex5 with radiography for working length determination of straight and curved root canals. MATERIALS AND METHODS: Twenty straight and single canals of maxillary central teeth and twenty curved mesiobuccal canals of mandibular molar teeth were used. Access cavities were prepared and working lengths were determined by means of Raypex5 and conventional radiography then compared with actual working lengths (AWL). Data were analyzed by ANOVA with repeated measurements and Least Significant Difference (LSD) test. RESULTS: There was no significant difference between electronic and actual working length determination for straight canals (p=0.74). For curved canals the difference between electronic and actual working length was significant (p<0.0001). There was a significant difference between radiographic and actual working length determination either for straight and curved canals (p=0.024, p<0.0001). The difference between radiographic and electronic working length determination was also significant for straight canals (p=0.006). The percentage of electronic measurements within ±0.5 of AWL was 70% for straight canals and 35% for curved root canals. The percentage of radiographic measurements within ± 0.5 of AWL was 50% for straight canals and 25% for curved root canals. CONCLUSION: Raypex 5 is an apex locator that measured the tooth length within a clinically acceptable range especially in anterior straight canals.