The work proposes a new real time Harmonic Elimination Pulse Width Modulation (HEPWM) technique for Voltage Source Inverters which is a useful alternative over SPWM (Sinusoidal Pulse Width Modulation) for high power inverters used in the mains and drives. HEPWM provides ideal solution for switching losses in inverters when operated in low frequency range. The switching angle of the HEPWM can be calculated based on non transcendental equations obtained by the curve fittings of certain polynomial functions. HEPWM permit real time computation as calculation of any switching angle requires only addition and multiplication processes and also any number of harmonics can be eliminated. The fundamental amplitude of pole switching waveform can be controlled on-line. The advantage of using real time computation over programmed (off-line) HEPWM is the absence of memory to store the switching angles. Also the switching angles can be calculated based on demand due to modulation parameters. The algorithm is implemented in single phase voltage source inverters using DSP TMS320C541 processor. The algorithm is so efficient to ensure sufficient time to calculate the pulse width, thus avoiding the need for memory storage. The accuracy of the derived equations is evaluated by calculating the difference between the approximate switching angles from the proposed method and the exact switching angles from the trajectories. For comparison, a MATLAB simulation of the same inverter was carried out. Simulations and hardware implementation show that proposed scheme allows efficient real time computations with acceptable error margins.