This is not quite as simple as it sounds because unlike a boiler who’s efficiency is not affected greatly by ambient temperatures or part loading, this is not the case with a heat pump.
To make the comparison real, I calculated the efficiency of the heat pump at every temperature from -5C to +15C allowing for part loading and worked out what percentage of the time the unit would run at that temperature using real weather data measured at my house.
At the time gas was ¼ of the price of electricity so a heat pump had to really go for it to match the run cost, even so it could be proved that as long as the ambient was above 3 degrees C, the heat pump was cheaper to run and as the ambient rose the heat pump got better and better.
Across the whole heating season the heat pump came out as 10% cheaper than the boiler to run, this was a breakthrough at the time.
As a matter of interest I've just done the maths again using current energy prices the interesting thing now is gas is now nearly ½ the price of electricity and oil is really expensive.
Using a current LG Art-cool gallery inverter unit now it is NEVER more expensive to run than a boiler, no matter how cold it is outside.
So for the first time ever you can now claim that the heat pump is now officially the cheapest way to heat your house.