Aim Potentially inappropriate medications (PIMs) in older people are associated with the increased use of health care services. The aim of this study was to investigate the prevalence of PIMs among the elderly being referred to pharmacies in Tehran using the Beers criteria of 2012, and identify factors related to PIMs. Methods This cross-sectional study was conducted on elderly patients (60 years and above) referred to pharmacies in Tehran, in 2017. The Beers' criteria 2012 were used to evaluate PIMs. The logistic regression analysis was used to find sociodemographic predictors of PIMs. Results The mean age of 1591 patients was 70.51 years. The overall prevalence of PIMs was 26.0%. The most frequent PIMs, in order of frequency, included diclofenac (13.5%), alprazolam (9.3%), and chlordiazepoxide (9.1%) and clonazepam (8.4%). The pain medications were found to be most common PIMs (37.6%). Polypharmacy (OR=3.64, CI 95%: .81-4.70; p<0.001), number of chronic disease (OR=2.371, CI 95%:1.71-3.28; p<0.001) insomnia (OR=1.45, CI 95%: 1.13-1.87; p<0.01) and type of specialists were found as PIMs risk factors. Internal medicine specialists prescribed PIMs significantly fewer times than other specialists(OR=0.59, CI 95%: 0.40-0.88; p<0.01, and the orthopedic specialists prescribed PIMs significantly more times than other physicians (OR=3.23, CI 95%: 5.76-1.81; p<0.001). Conclusion High prevalence of PIMs among Iranian elderly patients implies a need for the development and operationalization of scientific guidelines for the use of medicines. It is also necessary to hold training courses for physicians to be educated in such cases.