This paper has two different goals. First, we propose a new approach to analysing the retail sector that considers both firm size and product line. In second place, we intend to identify which variables determine gross margins in the Spanish retail industry, taking into account structural and behavioural factors. Using a data set provided by the Spanish National Institute of Statistics (INE), we estimate a non-linear regression function already applied in previous studies for other countries. The main results indicate that both the market structure and the distribution services are crucial determinants of gross margins in the retail sector in Spain.