You have to calculate the heat gained and heat lost.
The heat gained depends on the heater size, pool volume, water temperature and the ambient conditions.
The heat lost Depends on the water temperature, surface area, ambient conditions and if the pool is covered or uncovered
As the water heats up, the equations change.
So, you have to do an iterative process.
For example, if you start at a water temperature of 60 degrees and you are heating to 86 degrees, you can break it into maybe 6 calculations.
Water temperature.....Gain/hr.....Loss/hr.....Net Gain or Loss..............Time
60...................................1................0.45.............0.55 degrees.................9.1 hours.
65
70
75
80
85
So, you can calculate the time to go from 60 to 65 and then 65 to 70 etc.
The losses will be from a combination of evaporation, conduction, convection and radiation, so the calculations are not simple or easy to do in an accurate way.