We developed a simulation technique to study the effect of space charge interaction between trapped ions in the electrostatic ion beam trap (EIBT). The importance of space charge is demonstrated in both the dispersive and the self-bunching regime of the ion trap. The simulation results provide an estimate for the space charge effect on the trapping efficiency. They also allow for a better understanding of the enhanced diffusion and the self-bunching effect and provide a better characterization of the EIBT as a mass spectrometer, where peak coalescence is important. The numerical results reproduce all experimental data, demonstrating the critical importance of including space charge effects, even at low ion density, to understand the ion trap dynamics.