BackgroundDespite the goal of horizontal equity in Iran, little is known about it. This study aimed i) to assess socioeconomic inequality and horizontal inequity in the healthcare utilization; and ii) to explore the contribution of need and non-need variables to the observed inequalities.MethodsThis study used national cross sectional dataset from Utilization of Health Services survey in 2015. Concentration Index (C), Concentration Curve (CC) and Horizontal Inequity index (HI) were calculated to measure inequality in inpatient and outpatient health care utilization. Decomposition analysis was used to determine the contribution of need and non-need factors to the observed inequalities.ResultResults showed the pro-poor inpatient services in both rural (C = − 0.079) and non-rural areas (C = − 0.096) and the pro-rich outpatient services in both rural (C = 0.038) and non-rural (C = 0.007). After controlling for need factors, HI was positive and significant for outpatient services in rural (HI = 0.039) and non-rural (HI = 0.008), indicating that for given need, the better off especially in rural make greater use of outpatient services. The HI was pro-poor for inpatient services in both rural (HI = − 0.068) and non-rural (HI = -0.090), was significant only in non-rural area. Non-need factors were the most important contributors to explain inequalities in the decomposition analysis.ConclusionDisentangle the different contribution of determinants, as well as greater HI in rural areas for outpatient and in non-rural areas for inpatient services, provide helpful information for decision makers to re-design policy and re-distribute resource allocation in order to reduce the socioeconomic gradient in health care utilization.