Calculating the Times of Sunrise and Sunset with a Scientific Calculator
The first thing we need to do is determine the mean ecliptic longitude of the sun for your chosen day. Use this table to get a first approximation.
| MAR | APR | MAY | JUN | JUL | AUG | SEP | OCT | NOV | DEC | JAN | FEB | |
| 01 | 339.226° | 009.781° | 039.351° | 069.906° | 099.475° | 130.030° | 160.585° | 190.155° | 220.710° | 250.279° | 280.834° | 311.390° |
| 02 | 340.212° | 010.767° | 040.337° | 070.892° | 100.461° | 131.016° | 161.571° | 191.141° | 221.696° | 251.265° | 281.820° | 312.375° |
| 03 | 341.198° | 011.753° | 041.322° | 071.877° | 101.447° | 132.002° | 162.557° | 192.126° | 222.681° | 252.251° | 282.806° | 313.361° |
| 04 | 342.183° | 012.738° | 042.308° | 072.863° | 102.432° | 132.987° | 163.542° | 193.112° | 223.667° | 253.236° | 283.791° | 314.346° |
| 05 | 343.169° | 013.724° | 043.293° | 073.849° | 103.418° | 133.973° | 164.528° | 194.098° | 224.653° | 254.222° | 284.777° | 315.332° |
| 06 | 344.155° | 014.710° | 044.279° | 074.834° | 104.404° | 134.959° | 165.514° | 195.083° | 225.638° | 255.208° | 285.763° | 316.318° |
| 07 | 345.140° | 015.695° | 045.265° | 075.820° | 105.389° | 135.944° | 166.499° | 196.069° | 226.624° | 256.193° | 286.748° | 317.303° |
| 08 | 346.126° | 016.681° | 046.250° | 076.805° | 106.375° | 136.930° | 167.485° | 197.054° | 227.610° | 257.179° | 287.734° | 318.289° |
| 09 | 347.112° | 017.667° | 047.236° | 077.791° | 107.361° | 137.916° | 168.471° | 198.040° | 228.595° | 258.165° | 288.720° | 319.275° |
| 10 | 348.097° | 018.652° | 048.222° | 078.777° | 108.346° | 138.901° | 169.456° | 199.026° | 229.581° | 259.150° | 289.705° | 320.260° |
| 11 | 349.083° | 019.638° | 049.207° | 079.762° | 109.332° | 139.887° | 170.442° | 200.011° | 230.566° | 260.136° | 290.691° | 321.246° |
| 12 | 350.068° | 020.624° | 050.193° | 080.748° | 110.317° | 140.873° | 171.428° | 200.997° | 231.552° | 261.122° | 291.677° | 322.232° |
| 13 | 351.054° | 021.609° | 051.179° | 081.734° | 111.303° | 141.858° | 172.413° | 201.983° | 232.538° | 262.107° | 292.662° | 323.217° |
| 14 | 352.040° | 022.595° | 052.164° | 082.719° | 112.289° | 142.844° | 173.399° | 202.968° | 233.523° | 263.093° | 293.648° | 324.203° |
| 15 | 353.025° | 023.581° | 053.150° | 083.705° | 113.274° | 143.829° | 174.385° | 203.954° | 234.509° | 264.078° | 294.634° | 325.189° |
| 16 | 354.011° | 024.566° | 054.136° | 084.691° | 114.260° | 144.815° | 175.370° | 204.940° | 235.495° | 265.064° | 295.619° | 326.174° |
| 17 | 354.997° | 025.552° | 055.121° | 085.676° | 115.246° | 145.801° | 176.356° | 205.925° | 236.480° | 266.050° | 296.605° | 327.160° |
| 18 | 355.982° | 026.537° | 056.107° | 086.662° | 116.231° | 146.786° | 177.341° | 206.911° | 237.466° | 267.035° | 297.590° | 328.146° |
| 19 | 356.968° | 027.523° | 057.093° | 087.648° | 117.217° | 147.772° | 178.327° | 207.897° | 238.452° | 268.021° | 298.576° | 329.131° |
| 20 | 357.954° | 028.509° | 058.078° | 088.633° | 118.203° | 148.758° | 179.313° | 208.882° | 239.437° | 269.007° | 299.562° | 330.117° |
| 21 | 358.939° | 029.494° | 059.064° | 089.619° | 119.188° | 149.743° | 180.298° | 209.868° | 240.423° | 269.992° | 300.547° | 331.102° |
| 22 | 359.925° | 030.480° | 060.049° | 090.605° | 120.174° | 150.729° | 181.284° | 210.854° | 241.409° | 270.978° | 301.533° | 332.088° |
| 23 | 000.911° | 031.466° | 061.035° | 091.590° | 121.160° | 151.715° | 182.270° | 211.839° | 242.394° | 271.964° | 302.519° | 333.074° |
| 24 | 001.896° | 032.451° | 062.021° | 092.576° | 122.145° | 152.700° | 183.255° | 212.825° | 243.380° | 272.949° | 303.504° | 334.059° |
| 25 | 002.882° | 033.437° | 063.006° | 093.561° | 123.131° | 153.686° | 184.241° | 213.810° | 244.366° | 273.935° | 304.490° | 335.045° |
| 26 | 003.868° | 034.423° | 063.992° | 094.547° | 124.117° | 154.672° | 185.227° | 214.796° | 245.351° | 274.921° | 305.476° | 336.031° |
| 27 | 004.853° | 035.408° | 064.978° | 095.533° | 125.102° | 155.657° | 186.212° | 215.782° | 246.337° | 275.906° | 306.461° | 337.016° |
| 28 | 005.839° | 036.394° | 065.963° | 096.518° | 126.088° | 156.643° | 187.198° | 216.767° | 247.322° | 276.892° | 307.447° | 338.002° |
| 29 | 006.824° | 037.380° | 066.949° | 097.504° | 127.073° | 157.629° | 188.184° | 217.753° | 248.308° | 277.878° | 308.433° | 338.988° |
| 30 | 007.810° | 038.365° | 067.935° | 098.490° | 128.059° | 158.614° | 189.169° | 218.739° | 249.294° | 278.863° | 309.418° | |
| 31 | 008.796° | 068.920° | 129.045° | 159.600° | 219.724° | 279.849° | 310.404° |
Next we need to correct this approximation for your particular year. For the purposes of this correction, January and February are included with the previous year. (e.g. February of 1900 uses the correction for 1899.) Given that your year has four digits, find the first two in these tables. Add the correction at the top of the column and the left of the row. Don't forget to designate Old Style or New Style. (As a general rule, the red areas of the tables should seldom (if ever) be used.)
| Old Style | 001.157° | 000.386° | +000.386° | +001.157° |
| 001.070° | 00 | 01 | 02 | 03 |
| +002.015° | 04 | 05 | 06 | 07 |
| +005.101° | 08 | 09 | 10 | 11 |
| +008.186° | 12 | 13 | 14 | 15 |
| +011.271° | 16 | 17 | 18 | 19 |
| +014.356° | 20 | 21 | 22 | 23 |
| +017.441° | 24 | 25 | 26 | 27 |
| +020.526° | 28 | 29 | 30 | 31 |
| +023.611° | 32 | 33 | 34 | 35 |
| +026.697° | 36 | 37 | 38 | 39 |
| New Style | +000.322° | +000.107° | 000.107° | 000.322° |
| 000.577° | 00 | 01 | 02 | 03 |
| 000.449° | 04 | 05 | 06 | 07 |
| 000.320° | 08 | 09 | 10 | 11 |
| 000.192° | 12 | 13 | 14 | 15 |
| 000.064° | 16 | 17 | 18 | 19 |
| +000.064° | 20 | 21 | 22 | 23 |
| +000.192° | 24 | 25 | 26 | 27 |
| +000.320° | 28 | 29 | 30 | 31 |
| +000.449° | 32 | 33 | 34 | 35 |
| +000.577° | 36 | 37 | 38 | 39 |
Now find the last two digits of your year in this table and add the correction at the top of the column and the left of the row (like before).
| +000.358° | +000.119° | 000.119° | 000.358° | |
| 000.370° | 00 | 01 | 02 | 03 |
| 000.339° | 04 | 05 | 06 | 07 |
| 000.309° | 08 | 09 | 10 | 11 |
| 000.278° | 12 | 13 | 14 | 15 |
| 000.247° | 16 | 17 | 18 | 19 |
| 000.216° | 20 | 21 | 22 | 23 |
| 000.185° | 24 | 25 | 26 | 27 |
| 000.154° | 28 | 29 | 30 | 31 |
| 000.123° | 32 | 33 | 34 | 35 |
| 000.093° | 36 | 37 | 38 | 39 |
| 000.062° | 40 | 41 | 42 | 43 |
| 000.031° | 44 | 45 | 46 | 47 |
| +000.000° | 48 | 49 | 50 | 51 |
| +000.031° | 52 | 53 | 54 | 55 |
| +000.062° | 56 | 57 | 58 | 59 |
| +000.093° | 60 | 61 | 62 | 63 |
| +000.123° | 64 | 65 | 66 | 67 |
| +000.154° | 68 | 69 | 70 | 71 |
| +000.185° | 72 | 73 | 74 | 75 |
| +000.216° | 76 | 77 | 78 | 79 |
| +000.247° | 80 | 81 | 82 | 83 |
| +000.278° | 84 | 85 | 86 | 87 |
| +000.309° | 88 | 89 | 90 | 91 |
| +000.339° | 92 | 93 | 94 | 95 |
| +000.370° | 96 | 97 | 98 | 99 |
You now have the mean ecliptic longitude of the sun for midday (UT) of your chosen day. Sit this aside. We will come back to it later.
Now we also need to determine the ecliptic longitude of perigee of the sun on this same day. This changes very slowly, thus we need know only the year to compute it with sufficient accuracy. Find the first two (of four) digits in your year in this table. Add the number at the column head and row head as before.
| 002.58° | 000.86° | +000.86° | +002.58° | |
| 251.97° | 00 | 01 | 02 | 03 |
| 258.85° | 04 | 05 | 06 | 07 |
| 265.73° | 08 | 09 | 10 | 11 |
| 272.61° | 12 | 13 | 14 | 15 |
| 279.49° | 16 | 17 | 18 | 19 |
| 286.37° | 20 | 21 | 22 | 23 |
| 293.25° | 24 | 25 | 26 | 27 |
| 300.14° | 28 | 29 | 30 | 31 |
| 307.02° | 32 | 33 | 34 | 35 |
| 313.90° | 36 | 37 | 38 | 39 |
Now find the last two digits in this table and add the corrections at the column and row heads as before.
| 000.03° | 000.01° | +000.01° | +000.03° | |
| 000.83° | 00 | 01 | 02 | 03 |
| 000.76° | 04 | 05 | 06 | 07 |
| 000.69° | 08 | 09 | 10 | 11 |
| 000.62° | 12 | 13 | 14 | 15 |
| 000.55° | 16 | 17 | 18 | 19 |
| 000.48° | 20 | 21 | 22 | 23 |
| 000.41° | 24 | 25 | 26 | 27 |
| 000.34° | 28 | 29 | 30 | 31 |
| 000.28° | 32 | 33 | 34 | 35 |
| 000.21° | 36 | 37 | 38 | 39 |
| 000.14° | 40 | 41 | 42 | 43 |
| 000.07° | 44 | 45 | 46 | 47 |
| +000.00° | 48 | 49 | 50 | 51 |
| +000.07° | 52 | 53 | 54 | 55 |
| +000.14° | 56 | 57 | 58 | 59 |
| +000.21° | 60 | 61 | 62 | 63 |
| +000.28° | 64 | 65 | 66 | 67 |
| +000.34° | 68 | 69 | 70 | 71 |
| +000.41° | 72 | 73 | 74 | 75 |
| +000.48° | 76 | 77 | 78 | 79 |
| +000.55° | 80 | 81 | 82 | 83 |
| +000.62° | 84 | 85 | 86 | 87 |
| +000.69° | 88 | 89 | 90 | 91 |
| +000.76° | 92 | 93 | 94 | 95 |
| +000.83° | 96 | 97 | 98 | 99 |
You now have the ecliptic longitude of perigee of the sun for the mean summer solstice of your chosen year (and effectively for the entire year).
Now determine the mean anomaly of the sun using the following formula.
| mean ecliptic longitude of the sun | | ecliptic longitude of perigee of the sun | = | mean anomaly of the sun |
Now, to make sure that your scientific calculator is in "degree mode", punch in "90 cos". Your result should be "0.000000". If you get something else, then your calculator is not in degree mode. (Refer to your calculators owner's manual to get in "degree mode".)
Now determine the ecliptic longitude of the sun using the following formula.
| mean ecliptic longitude of the sun | +1.915°×( | mean anomaly of the sun | sin)+0.020°×(( | mean anomaly of the sun | ×2)sin)= | ecliptic longitude of the sun |
Now you can get the declination of the sun with the next formula. (On some calculators "asin" will be labeled "sin-1".)
| (( | ecliptic longitude of the sun | sin)×0.39777)asin= | declination of the sun |
Also you will want the right ascension of the sun. Use this for that.
| ecliptic longitude of the sun | (((( | ecliptic longitude of the sun | ×2)sin)÷(23.2377+(( | ecliptic longitude of the sun | ×2)cos)))atan)= | right ascension of the sun |
Another thing we will need is the equation of time. Here is the formula for that.
| right ascension of the sun | | mean ecliptic longitude of the sun | = | equation of time |
Now we can compute the times of sunrise and sunset. (Ignore the red spots for now. If you get an error when you push "asin" it means that that event (sunrise or sunset) does not occur.) (Longitudes are positive eastward and negative westward. Latitudes are positive northward and negative southward.)
| 90° | terrestrial longitude of observation | = | mean time of sunrise |
| mean time of sunrise | ((( | terrestrial latitude of observation | tan)×( | declination of the sun | tan)·)asin)+ | equation of time | = | time of sunrise |
| 270° | terrestrial longitude of observation | = | mean time of sunset |
| mean time of sunset | +((( | terrestrial latitude of observation | tan)×( | declination of the sun | tan)·)asin)+ | equation of time | = | time of sunset |
These definitions for sunrise and sunset divide time equally into day and night. Another common definition of sunrise and sunset is when the upper limb of the sun apparently crosses the horizon. To get these times, one must correct for the semidiameter of the sun and for atmospheric refraction. (These effects total about 50 minutes of arc.) To accomplish this, insert the following where you see the red spots.
| +0.01454÷( | terrestrial latitude of observation | cos)÷( | declination of the sun | cos) |
To calculate the times of other events, you can replace the red number as follows.
| civil twilight | 0.10453 | |
| nautical twilight | 0.20791 | |
| astronomical twilight | 0.30902 |
To convert your answers from degrees to regular clock time, divide by 360 and multiply by 24. The whole part of this number is the hour. Subtract off the whole hours and multiply the remaining fraction by 60. The whole part of this number is the minutes. Again, subtract off the whole minutes and multiply the remaining fraction by 60. These are the seconds. (You now have Universal Time in the hour/minute/second format. Converting to your local time is up to you. My local time is United States Eastern Standard Time, so I subtract 5 hours.)
Now you may notice that your times differ significantly from the times in an almanac. This is because you used the mean ecliptic longitude of the sun for midday (UT) of your chosen day and not the actual time of the event (sunrise or sunset). If you want your calculations to be perfect (i.e. to agree with the almanac), you will need to interpolate the mean ecliptic longitude of the sun for the actual time of the event. Start by doing the whole calculation without interpolation. This will give you very nearly the actual time of the event (likely within one minute). Use this time to create the interpolating factor. Now with your interpolated mean ecliptic longitude of the sun, go back and do the whole calculation again. Your new answer will likely differ by less than a minute. If you want it even more accurate, use this answer to interpolate and do the whole calculation yet again. After doing this several times, you should notice that your final answer is no longer changing. This is the actual time of the event.
The general accuracies involved in this algorithm are as follows.
| mean ecliptic longitude of the sun | ±0.002° | |
| ecliptic longitude of perigee of the sun | ±0.02° | |
| mean anomaly of the sun | ±0.02° | |
| ecliptic longitude of the sun | ±0.01° | |
| declination of the sun | ±0.01° | |
| right ascension of the sun | ±0.01° | |
| equation of time | ±0.01° | |
| mean time of sunrise/sunset | ±0 | |
| time of sunrise/sunset (in the tropics) | ±0.01° (± 3 seconds) |
March 20, 2000 I prepared this page in a way that it should not contain errors. I have tested it once, the results of which agreed exactly with a standard almanac. author
This page is part of the Moonstick Information Site.
copyright © 2000 Sean Barton, all rights reserved