# Calculating the length of day at any time of the year? [duplicate]

Is it possible to calculate the length of the day at various location (distances) from the sun? I hear agricultural scientists are able to do that. To make calculations easier assume there is no axis tilt, measurements are made at the equator, and would like to know how it would change if there is a tilt.

-

## marked as duplicate by twistor59, John Rennie, Brandon Enright, David Z♦Jun 9 '13 at 2:21

Possible duplicates: physics.stackexchange.com/q/28563/2451 and physics.stackexchange.com/q/25733/2451 and links therein. –  Qmechanic Jun 8 '13 at 17:19
My question is based on the distance from the sun,A general solution –  Derg Jun 8 '13 at 17:57
Why is the distance from the sun supposed to matter ? –  babou Jun 8 '13 at 19:14
I did a report in school on the subject although that's almost 10 years past. The relation is - to a good precision - sinodial. You can simply use the longest and shortest day of the year to fit the sine $$f(x) = a \cdot \sin(\omega x - x_0) + b.$$ Depending on your choice of scale, x will be in days or something else.
This website does the calculation for you. You could just as easy look up the dates on your own and find $a$, $x_0$ and $b$ for your location on your own ($\omega$ will be $2 \pi/(1 \mathrm{year})$).