When one irradiates some material with X-ray, the component of X-ray spectrum corresponding to the excitation of the inner shell of an atom contained in the material is absorbed. The fine structure in the spectrum of this X-ray absorption edge is called X-ray absorption fine structure (XAFS), and contains various information on the structure of the material in the atomistic scale. To extract such information, it is necessary to compute the anticipated electronic state of the related atoms and compare it with experiments. Most of applications for X-ray analysis, such as FEFF, Demeter and Missing, come with functions that produce X-ray absorption spectrum, so that the comparison to experiments can be done easily. In addition, by using packages of first-principles calculation with X-ray spectrum calculation capability (e.g., WIEN2k, Exciting, Quantum ESPRESSO, ANINIT, AkaiKKR SPRKKR GPAW) one can do the X-ray analysis in higher precision.