We derive the exact formula for thermal-equilibrium spacing distribution of one-dimensional particle gas with repulsive potential V(r)=r^(-a) (a>0) depending on the distance r between the neighboring particles. The calculated distribution (for a=1) is successfully compared with the highway-traffic clearance distributions, which provides a detailed view of changes in microscopical structure of traffic sample depending on traffic density. In addition to that, the observed correspondence is a strong support of studies applying the equilibrium statistical physics to traffic modelling.