First-principles calculation of electronic structures of approximant crystals is a reliable tool for studying cohesion mechanism and electronic properties of real quasicrystals. This article aims at explaining the first-principles calculation as methodology of quasicrystal reaseach. After brief introduction of approximant and methods of the first-principles calculations, we present several approaches, including the tight-binding method and the plane-wave-basis method, for Cd-M (M = Ca, Mg) binary systems.