The calculation of power factor is done according to the laws of physics. You have to know the active power value and apparent power value.
The product of root mean square (RMS) value of voltage and current is known as Apparent Power. This power is measured in volt-ampere (VA), kilo volt-ampere (kVA) or mega volt-ampere( MVA).
Apparent power is taken into account when designing and operating power systems, because although the current associated with reactive power does no work at the load, it still must be supplied by the power source. Conductors, transformers and generators must be sized to carry the total current, not just the current that does useful work.
Failure to provide for the supply of sufficient reactive power in electrical grids can lead to lowered voltage levels and, under certain operating conditions, to the complete collapse of the network or blackout.
Another consequence is that adding the apparent power for two loads will not accurately give the total power unless they have the same phase difference between current and voltage (the same power factor).
The power which is actually consumed or utilized in an AC Circuit is called True power or Active power or Real power. It is measured in watt (W), kilowatt (kW) or megawatt (MW). It is the actual outcomes of the electrical system which runs the electric circuits or load.
The power factor of an AC electrical power system is defined as the ratio of the real power absorbed by the load to the apparent power flowing in the circuit
The power factor is defined as the ratio of real power to apparent power. As power is transferred along a transmission line, it does not consist purely of real power that can do work once transferred to the load, but rather consists of a combination of real and reactive power, called apparent power. The power factor describes the amount of real power transmitted along a transmission line relative to the total apparent power flowing in the line.
The calculation of power factor value is very important when you have to calculate the wire size.