Beam monitoring of relativistic charged particle beams is of great interest for various applications including a high-order harmonic generation-seeded free-electron-lasers. In particular, in phenomena with low repeatability/reproducibility such as laser-plasma acceleration experiments, it is important to measure spatio-temporal density profile of accelerated charged particle beams in a single shot. In this research, single-shot ultrafast spatio-temporal density profile measurement of relativistic electron beams in radiofrequency accelerators is conducted via obtaining spatio-temporal electric-field profile around the beams with combination of electro-optic sampling and echelon-based single-shot method. Here, we introduced an analytical model derived by special relativistic electromagnetism to deduce longitudinal and transverse beam sizes by measured spatio-temporal electric-field profiles.