This graph is based on the simplest model treating the earth as spherical and stationary with the rays of sun light coming in parallel (as if the sun is infinitely far away).

The formula used to build the above graph can be derived from the geometry of a latitude circle: The portion of the latitude circle that is illuminated determines the length of day.

lod = length of day = duration of daylight in hours

θ = North latitude in degrees

23.5 = inclination of earth's axis of rotation in degrees

n = number of 12ths of a year past the winter solstice (not quite the same as months)

The actual length of day will be influenced by several factors that were not considered here including the non-sperical shape of the earth, its orbital motion and the illumination of the atmosphere.