Nowadays accurate characterization of the magnetic component losses becomes increasingly important in the design stage of power converters. As the main challenge in characterizing a magnetic component, the core loss is commonly measured through the two winding B-H loop measurement method that is susceptible to the phase discrepancy error, especially for low-permeability, low-loss cores. This paper, therefore, proposes a new offline method to compensate the phase discrepancy error in high-frequency core loss measurement under rectangular voltage excitation. In the post-processing of measured waveforms, the phase discrepancy is compensated by shifting the measured current horizontally to align with a reference phase angle, which is found from an offline impedance sweep on the component-under-test and FFT analysis. As a result, the testing voltage and current waveforms can be measured without considering deskew at the time of measuring. Additionally, this method is more accurate than calibration methods considering a fixed frequency response (e.g., a deskew fixture), because it considers the frequency response across the whole spectrum. The proposed approach can be well applied for typical PWM converters with switching frequencies up to hundreds of kilohertz, for which the effective voltage harmonics extend to a few megahertz range that can be well evaluated with an impedance analyzer. The presented method is experimentally verified against the existing partial cancellation method which is immune to phase discrepancy error.