The general expression for the diffusion coefficient for a dense, interacting particle system moving through a one-dimensional non-homogeneous energy potential is derived. Based on this expression, it is shown that the diffusion coefficient as a function of density depends to a great extent on the shape of the energy landscape. The presence of other particles affects the diffusion coefficient in another way as they pass through the same energy barriers, but set in a different order. The obtained result comes from a variational approach to diffusion and the interactions are taken into account using the transfer-matrix method. Interactions impact on the dynamics of the system, both by changing the equilibrium probabilities of the occupied states and by changing the barriers for the particle jumps. Several examples of diffusion in different energy potentials are presented and the dependence of the diffusion coefficient on potential and interactions is discussed.