This talk will discuss our recent work to simulate electron and phonon thermoelectric properties based on the density-functional theory, including electrical conductivity, Seebeck coefficient, electronic thermal conductivity and phonon thermal conductivity. Main challenges are simulation of scattering among carriers by phonons, impurities and alloy. For electron transport simulations, the electron-phonon interactions, as well as electron-impurity and electron-alloy scatterings are computed from first-principles to obtain electron relaxation times based on Fermi’s golden rule. The energy dependent relaxation times are then used in the Boltzmann transport theory to obtain the electrical conductivity, Seebeck coefficient and electronic thermal conductivity. For phonon transport, the anharmonic force constants are derived from first-principles and used to compute phonon relaxation times. The energy dependent mean free paths are computed for both electrons and phonons. After validating the simulation on well-characterized materials such as Si and GaAs (EPL, 109, 57006, 2015; PRL, 114, 115901, 2015; PNAS, 112, 14777, 2015; PRB, 95, 075206, 2017), we moved on to simulate thermoelectric materials such as half-Heuslers, chalcogenides and several alloy systems. We reveal that 1) large power factors often seen in half-Heuslers can be attributed to their non-bonding orbitals at the band edge, which can be protected by the crystal symmetry; 2) Dirac-like band structure allows electron mean free path filtering that can significantly enhance the Seebeck coefficient. These results led to deeper understanding of thermoelectric transport in existing materials, and also point to new directions for improving existing materials via nanostructures, as well as for discovering new material systems. This work is supported by S3TEC, an Energy Frontier Research Center funded by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences under Award Number: DE-SC0001299/DE-FG02-09ER46577.