A switched mode power supply, SMPS, (200, 400, 800) comprising: a line rail and a neutral rail; a filter (202, 402) coupled between the line rail and the neutral rail, the filter including an input for receiving an AC input voltage (Vin_ac) and an AC input current (i_in), an X-capacitance (C_eq), and an output; a power factor correction, PFC, circuit coupled to the output of the filter, the PFC circuit including an input for receiving a PFC AC current (i_pfc); and a control circuit (206, 406, 806) coupled to the PFC circuit, the control circuit configured to: generate an analog signal representing a difference between an AC line voltage and an AC neutral voltage, compare the analog signal and a defined threshold to determine zero crossings of the analog signal, determine a frequency of the AC input voltage or the AC input current based on at least two of the zero crossings of the analog signal, determine a reactive current (i_c) flowing through the X-capacitance (C_eq) in the filter based on the determined frequency, determine a calculated AC input current (Iin_cal) of the SMPS based on the determined reactive current (i_c) and the PFC AC current (i_pfc), and characterized by the control circuit further configured to: determine an estimated AC input current (Iin_est) of the SMPS based on a defined efficiency, an output power (Pout_cal.) of the SMPS and an AC main voltage (Vac), determine a difference (ΔIin) between the calculated AC input current (Iin_cal) and the estimated AC input current (Iin_est), determine an average value of the AC input current (Iin_avg) when the difference (ΔIin) is less than a defined tolerance threshold, determine an accuracy of the determined AC input current (Iin_cal) based on the average value of the AC input current, and report the determined AC input current to an external device if the accuracy is less than a defined accuracy threshold (Acc_threshold). a line rail and a neutral rail; a filter (202, 402) coupled between the line rail and the neutral rail, the filter including an input for receiving an AC input voltage (Vin_ac) and an AC input current (i_in), an X-capacitance (C_eq), and an output; a power factor correction, PFC, circuit coupled to the output of the filter, the PFC circuit including an input for receiving a PFC AC current (i_pfc); and a control circuit (206, 406, 806) coupled to the PFC circuit, the control circuit configured to: generate an analog signal representing a difference between an AC line voltage and an AC neutral voltage, compare the analog signal and a defined threshold to determine zero crossings of the analog signal, determine a frequency of the AC input voltage or the AC input current based on at least two of the zero crossings of the analog signal, determine a reactive current (i_c) flowing through the X-capacitance (C_eq) in the filter based on the determined frequency, determine a calculated AC input current (Iin_cal) of the SMPS based on the determined reactive current (i_c) and the PFC AC current (i_pfc), and characterized by the control circuit further configured to: determine an estimated AC input current (Iin_est) of the SMPS based on a defined efficiency, an output power (Pout_cal.) of the SMPS and an AC main voltage (Vac), determine a difference (ΔIin) between the calculated AC input current (Iin_cal) and the estimated AC input current (Iin_est), determine an average value of the AC input current (Iin_avg) when the difference (ΔIin) is less than a defined tolerance threshold, determine an accuracy of the determined AC input current (Iin_cal) based on the average value of the AC input current, and report the determined AC input current to an external device if the accuracy is less than a defined accuracy threshold (Acc_threshold). generate an analog signal representing a difference between an AC line voltage and an AC neutral voltage, compare the analog signal and a defined threshold to determine zero crossings of the analog signal, determine a frequency of the AC input voltage or the AC input current based on at least two of the zero crossings of the analog signal, determine a reactive current (i_c) flowing through the X-capacitance (C_eq) in the filter based on the determined frequency, determine a calculated AC input current (Iin_cal) of the SMPS based on the determined reactive current (i_c) and the PFC AC current (i_pfc), and characterized by the control circuit further configured to: determine an estimated AC input current (Iin_est) of the SMPS based on a defined efficiency, an output power (Pout_cal.) of the SMPS and an AC main voltage (Vac), determine a difference (ΔIin) between the calculated AC input current (Iin_cal) and the estimated AC input current (Iin_est), determine an average value of the AC input current (Iin_avg) when the difference (ΔIin) is less than a defined tolerance threshold, determine an accuracy of the determined AC input current (Iin_cal) based on the average value of the AC input current, and report the determined AC input current to an external device if the accuracy is less than a defined accuracy threshold (Acc_threshold).