1. An X-ray analyzer, comprising: an X-ray source for emitting characteristic X-rays to a sample; an X-ray detector having a detection surface where detection elements for detecting the intensity of the X-rays emitted from said sample are aligned one-dimensionally or two-dimensionally; a correction coefficient storage unit for storing a sensitivity correction coefficient for each detection element; and an X-ray intensity distribution image forming unit for forming a corrected X-ray intensity distribution image by carrying out correction operations on the measured X-ray intensities detected by said detection elements using said sensitivity correction coefficients, characterized by further comprising: a control unit for carrying out function fitting on the measured X-ray intensity distribution gained by measuring an already-known sample and allowing the correction coefficient storage unit to store the ratio of a calculated X-ray intensity calculated by the fitting function to the measured X-ray intensity as the sensitivity correction coefficient for each detection element.