The developments of quantum computing algorithms and experiments for atomic scale simulations have largely focused on quantum chemistry for molecules, while their application in condensed matter systems is scarcely explored. Here we present a quantum algorithm to perform dynamical mean field theory (DMFT) calculations for condensed matter systems on currently available quantum computers, and demonstrate it on two quantum hardware platforms. DMFT is required to properly describe the large class of materials with strongly correlated electrons. The computation-ally challenging part arises from solving the effective problem of an interacting impurity coupled to a bath, which scales exponentially with system size on conventional computers. An exponential speedup is expected on quantum computers, but the algorithms proposed so far are based on real time evolution of the wavefunction, which requires high-depth circuits and hence very low noise levels in the quantum hardware. Here we propose an alternative approach, which uses the variational quantum eigensolver (VQE) method for ground and excited states to obtain the needed quantities as part of an exact diagonalization impurity solver. We present the algorithm for a two site DMFT system, which we benchmark using simulations on conventional computers as well as experiments on superconducting and trapped ion qubits, demonstrating that this method is suitable for running DMFT calculations on currently available quantum hardware.