<p>In celestial navigation this point is called the <em>Geographic Position</em> (GP) of the Sun.  Since it is also useful to compute the GP of other bodies, I will give a general solution that applies to all RA/Dec coordinates.</p>
<p>Given the Right Ascension and Declination of an object, the GP of the body is:</p>
<p><span class="math-container">$$
\begin{align*}
Latitude &amp;= Declination \\
Longitude &amp;= 360^\circ - (360^\circ - RA + GST)
\end{align*}
$$</span></p>
<p>Where GST in the Greenwich Sidereal Time.  For high accuracy, it is necessary to use Greenwich Apparent Sidereal Time, but since you asked for a simple formula, I will use Greenwich Mean Sidereal Time, which will still be accurate for recent times.</p>
<p><span class="math-container">$$
\begin{align*} 
\theta &amp;= 0.7790572732640 + 0.00273781191135448D_u + frac(JD(UT1)) \\
T &amp;=\frac{JD_{UT1} - 2451545.0}{36525} \\
GMST &amp;= \theta + 0.014506 + 4612.15739966T + 1.39667721T^2 + -0.00009344T^3 + 0.00001882T^4 \\
\end{align*}
$$</span></p>
<p><span class="math-container">$ D_u $</span> = Number of WHOLE days of UT1 since J2000 (JD(UT1) – 2451545.0)</p>
<p><span class="math-container">$ \theta $</span> = Earth Rotation Angle (in arcseconds)</p>
<p>T = Centuries of UT1 since J2000</p>
<p>GMST = Greenwich Mean Sidereal Time (in arcseconds)</p>
<p>The last piece of information needed is the RA/Dec of the Sun, the Astronomical Almanac provides probably the shortest useful algorithm for the position of the Sun, valid from 1950-2050.  If you want higher accuracy, or over a longer period of time, you'll need to use an ephemeris such as <a href="https://github.com/gmiller123456/vsop87-multilang" rel="nofollow noreferrer">VSOP87</a>.  Here is the algorithm implemented in JavaScript, and you can test it <a href="https://www.celestialprogramming.com/sunPosition-LowPrecisionFromAstronomicalAlmanac.html" rel="nofollow noreferrer">here</a></p>
<pre><code>//Low precision sun position from Astronomical Almanac page C5 (2017 ed).
//Accuracy 1deg from 1950-2050
function sunPosition(jd)    {
    const torad=Math.PI/180.0;
    n=jd-2451545.0;
    L=(280.460+0.9856474*n)%360;
    g=((375.528+.9856003*n)%360)*torad;
    if(L&lt;0){L+=360;}
    if(g&lt;0){g+=Math.PI*2.0;}

    lamba=(L+1.915*Math.sin(g)+0.020*Math.sin(2*g))*torad;
    beta=0.0;
    eps=(23.439-0.0000004*n)*torad;
    ra=Math.atan2(Math.cos(eps)*Math.sin(lamba),Math.cos(lamba));
    dec=Math.asin(Math.sin(eps)*Math.sin(lamba));
    if(ra&lt;0){ra+=Math.PI*2;}
    return [ra/torad/15.0,dec/torad];
}
</code></pre>
<p>A higher accuracy version would use the full reduction process explained in the Explanatory Supplement for the Astronomical Almanac which corrects for precession, nutation, aberration, parallax, polar motion, time scales, and more.</p>
<p>The Nautical Almanac enumerates the values with all of the corrections for several stars, the sun and planets with an accuracy of .1 arcminutes.</p>
<p>I have <a href="https://www.celestialprogramming.com/snippets/geographicPosition.html" rel="nofollow noreferrer">implemented this algorithm here</a>, though it is not complete (I intend to add corrections for some of the effects producing an error greater than .1 arcminutes).  But it currently implements all of the parts mentioned above.</p>

CC BY-SA 4.0
2022-08-25T14:10:44.210Z
The equation for the latitude can obviously be simplified, but I chose to show it as if converted directly from celestial navigation terminology where hour angles are used which are opposite from RA and longitude.  If you look at texts on celestial navigation, the way I've written it makes it more obvious as to what is going on.
Greg Miller
CC BY-SA 4.0
2022-08-25T20:10:32.513Z
Thanks for the nice answer! however, JD derivation technically is missing :-)
Pa_
CC BY-SA 4.0
2022-08-25T20:24:48.303Z
I found JD derivation method in your website. However, your solution also seem to produce different results compared to https://www.timeanddate.com/worldclock/sunearth.php , can you double check?
Pa_
CC BY-SA 4.0
2022-08-26T12:08:10.120Z
Seems to match within one degree which is within the accuracy of the Sun position algorithm.  I will eventually add VSPO87 to that page producing higher accuracy, but if you want "simple" it's going to be less accurate.
Greg Miller
CC BY-SA 4.0
2022-08-26T15:05:15.140Z
Right now, timeanddate reports On Friday, 26 August 2022, 15:02:00 UTC the Sun is at its zenith at Latitude: 10° 16' North, Longitude: 45° 03' West, your method [8.360038700401809,19.460248533502863], but in the evening the latitude error is greater even
Pa_
CC BY-SA 4.0
2022-08-26T17:33:06.797Z
Not sure where the [8.34...,19.4...] numbers came from.  Using 15:02UTC, my page reports the sun's position as +010° 22' 44.92" -045° 20' 25.26", and the TimeAndDate site reports Latitude: 10° 16' North, Longitude: 45° 03' West.
Greg Miller
CC BY-SA 4.0
2022-08-26T21:22:22.710Z
thanks, i had to double check, and i was getting the julian date calculation (not included in the snipped here) wrong.
However, the longitude straight out of the function does not seem right..
I now finally found a solution (edited the question), but If you can please fix the answer including all that is necessary to get the right values out of the method starting with gregorian date, i will still accept the answer.
Pa_
CC BY-SA 4.0
2022-08-25T14:08:27.917Z
2022-08-25T16:42:28.400Z
2022-08-25T16:42:28.400Z
Greg Miller
<p>Couldn't find an answer so here I come:</p>
<p>On 21st of June and 21st of December these points would lie on the tropics.</p>
<p>But what about the other days of the year?</p>
<p>Is there a simple formula to calculate the latitude, longitude of the closest point to the Sun on Earth's surface at any given date-time?
And would the shadow circle of the earth be centered at the opposite point?</p>
<p>Edit:
One part of the answer seems to be <a href="https://stackoverflow.com/questions/62184648/how-to-calculate-the-latitude-of-the-subsolar-point-ie-solar-declination-usin">here</a></p>
<p>Edit2:
After more searching, i finally stumbled upon a <a href="https://python.plainenglish.io/find-the-suns-subsolar-point-42e9d4935b1c" rel="nofollow noreferrer">fully cooked up solution</a></p>
<p>However, when i compare the result to, for example <a href="https://www.timeanddate.com/worldclock/sunearth.php" rel="nofollow noreferrer">https://www.timeanddate.com/worldclock/sunearth.php</a>, they do differ quite significantly.
E.g.,  the website reports</p>
<blockquote>
<p>On Thursday, 25 August 2022, 06:58:00 UTC the Sun is at its zenith at
Latitude: 10° 44' North, Longitude: 76° 03' East</p>
</blockquote>
<p>while the function generates</p>
<blockquote>
<p>Lat: 19.63448840599144 Lon: 77.26722364174202.</p>
</blockquote>
<p>So longitude is pretty close, latitude pretty far off.</p>
<p>For completeness, here's the function as i translated:</p>
<pre><code>function toInt(d) {
    return d | 0
}
function subsolar(ye, mo, da, ho, mi, se) {
    var ta = Math.PI * 2.0
    var ut = ho + mi / 60.0 + se / 3600.0
    var t = 367.0 * ye - toInt(7.0 * (ye + toInt((mo + 9.0) / 12.0)) / 4.0)
    var dn = t + toInt((275.0 * mo) / 9.0) + da - 730531.5 + ut / 24.0
    var sl = dn * 0.01720279239 + 4.894967873
    var sa = dn * 0.01720197034 + 6.240040768
    t = sl + 0.03342305518 * Math.sin(sa)
    var ec = t + 0.0003490658504 * Math.sin(2.0 * sa)
    var ob = 0.4090877234 - 0.000000006981317008 * dn
    var st = 4.894961213 + 6.300388099 * dn
    var ra = Math.atan2(Math.cos(ob) * Math.sin(ec), Math.cos(ec))
    var de = Math.asin(Math.sin(ob) * Math.sin(ec))
    var la = degrees(de)
    var lo = degrees(ra - st) % 360.0
    lo = (lo &gt; 180.) ? lo - 360. : lo
    lo = (lo &lt; -180.) ? lo + 360. : lo
    return [la, lo]
}
</code></pre>
<p>To be fair, this algorithm does not look the same as what previously published, like <a href="https://ntrs.nasa.gov/api/citations/20200003207/downloads/20200003207.pdf" rel="nofollow noreferrer">here</a>, which is instead what wikipedia references.
However, <a href="https://ntrs.nasa.gov/api/citations/20200003207/downloads/20200003207.pdf" rel="nofollow noreferrer">3</a> is unclear at best, not specifying</p>
<ol>
<li>what Nleap is and how to derive</li>
<li>How to derive Fraction of day (i would assume as <em>((h + (m/60.0) + (s/3600.0)) / 24.0)</em> , but i can't be sure)</li>
<li>what Tgmt is and in what units it is expected to be given (hours? minutes? fraction of the day?)</li>
</ol>
<p>Edit 3: the python algorithm (translated above into javascript) actually works reasonably well.
The issue i was having is that javascript getMonth returns values in the [0-11] range, while this method expects values in the [1-12] range.</p>

CC BY-SA 4.0
2022-08-21T23:35:35.123Z
It depends on your definition of simple and your math skills. There is a "simple" equation to calculate the Right Ascension of the Sun, a simple equation to calculate the Declination of the Sun, and a simple formula to calculate the Greenwich Mean Sidereal Time (GMST). Knowing those three values, the subsolar point can be calculated.
JohnHoltz
CC BY-SA 4.0
2022-08-22T00:25:29.660Z
"And would the shadow circle of the earth be centered at the opposite point?" Draw or imagine a circle for Earth with a dot at Earth's center. Then draw/imagine a long straight line passing through the center. The two places where the line intersects the surface are indeed the closest point to the Sun and the center of Earths' shadow circle (actually a cylinder). Of course this model assumes a point Sun and spherical Earth but I think that's okay assuming we're looking for a "simple formula". In order to keep it simple, we also need Earth's orbit around the Sun to be circular as well.
uhoh
CC BY-SA 4.0
2022-08-22T00:29:36.167Z
With all those simplifications, we can get the lat/lon of f the *subsolar point* as a function of sidereal time with a simple [spherical triangle](https://en.wikipedia.org/wiki/Spherical_trigonometry) and then convert sidereal to UTC with one more simple equation. But these will indeed be approximations. There will be more complicated approximations in Jean Meeus' "Astronomical Algorithms" and/or "Astronomical Formulae for Calculators".
uhoh
CC BY-SA 4.0
2022-08-22T01:26:12.407Z
@uhoh Cylinder? Don't you mean cone? https://www.nasa.gov/audience/forstudents/k-4/stories/umbra-and-penumbra
PM 2Ring
CC BY-SA 4.0
2022-08-22T03:47:34.730Z
@PM2Ring No I do not mean that. While "Of course this model assumes a point Sun and spherical Earth..." and "...Earth's orbit around the Sun to be circular as well..." would produce *an very gradually diverging conical umbra, the difference between that and a cylinder is way way smaller than the other effects also neglected by the level of approximation suggested in my comments trying to address the OP's request; "Is there a simple formula...?
"
uhoh
CC BY-SA 4.0
2022-08-22T04:08:30.193Z
BTW, this is called the [subsolar point](https://en.wikipedia.org/wiki/Subsolar_point). Do you specifically want to calculate it yourself? You can get it from various websites, eg [Horizons](https://ssd.jpl.nasa.gov/api/horizons.api?format=text&MAKE_EPHEM=YES&EPHEM_TYPE=O&OBJ_DATA=NO&COMMAND=399&CENTER=%4010&QUANTITIES=14&START_TIME=2020-3-20&STOP_TIME=2020-3-21&STEP_SIZE=1h)
PM 2Ring
CC BY-SA 4.0
2022-08-22T05:58:38.593Z
thanks all for the very useful replies. @PM2Ring yes i would like to calculate it myself
Pa_
CC BY-SA 4.0
2022-08-22T06:40:37.843Z
@PM2Ring thanks for the excellent pointer! one question, as layman: what exactly is jdn argument, j2000, (julian centuries, i would assume?) and how to derive these values? 
Probably they are what we call normally something else, but i just wanted to double check.
Also, i get name 'poly' is not defined. What would anyway be its javascript equivalent?
Pa_
CC BY-SA 4.0
2022-08-22T07:06:48.700Z
@PM2Ring found this resource https://equation-of-time.info/calculating-the-equation-of-time , would that be about right? (seems easier to translate into JS or other languages than porting poly())
Pa_
CC BY-SA 4.0
2022-08-22T07:14:44.573Z
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/138682/discussion-between-pm-2ring-and-pa).
PM 2Ring
CC BY-SA 4.0
2022-08-25T14:26:22.497Z
Third document lists "$_{}$ is the number of leap years," apparently the count since 1/1/2000. Given how $T_{GMT}$ is used in that document, (subtract 12, multiply by 15, get a longitude) it looks to be Greenwich Mean Time in decimal hours.
notovny
<the-sun><earth><mathematics>
How do I calculate the closest point to the sun on Earth's surface?
Pa_
# How do I calculate the closest point to the sun on Earth's surface?

(Asked by: username_0 on 2022-08-21)

Couldn't find an answer so here I come:
On 21st of June and 21st of December these points would lie on the tropics.
But what about the other days of the year?
Is there a simple formula to calculate the latitude, longitude of the closest point to the Sun on Earth's surface at any given date-time?
And would the shadow circle of the earth be centered at the opposite point?
Edit:
One part of the answer seems to be here
Edit2:
After more searching, i finally stumbled upon a fully cooked up solution
However, when i compare the result to, for example https://www.timeanddate.com/worldclock/sunearth.php, they do differ quite significantly.
E.g.,  the website reports

On Thursday, 25 August 2022, 06:58:00 UTC the Sun is at its zenith at
Latitude: 10° 44' North, Longitude: 76° 03' East

while the function generates

Lat: 19.63448840599144 Lon: 77.26722364174202.

So longitude is pretty close, latitude pretty far off.
For completeness, here's the function as i translated:
function toInt(d) {
    return d | 0
}
function subsolar(ye, mo, da, ho, mi, se) {
    var ta = Math.PI * 2.0
    var ut = ho + mi / 60.0 + se / 3600.0
    var t = 367.0 * ye - toInt(7.0 * (ye + toInt((mo + 9.0) / 12.0)) / 4.0)
    var dn = t + toInt((275.0 * mo) / 9.0) + da - 730531.5 + ut / 24.0
    var sl = dn * 0.01720279239 + 4.894967873
    var sa = dn * 0.01720197034 + 6.240040768
    t = sl + 0.03342305518 * Math.sin(sa)
    var ec = t + 0.0003490658504 * Math.sin(2.0 * sa)
    var ob = 0.4090877234 - 0.000000006981317008 * dn
    var st = 4.894961213 + 6.300388099 * dn
    var ra = Math.atan2(Math.cos(ob) * Math.sin(ec), Math.cos(ec))
    var de = Math.asin(Math.sin(ob) * Math.sin(ec))
    var la = degrees(de)
    var lo = degrees(ra - st) % 360.0
    lo = (lo > 180.) ? lo - 360. : lo
    lo = (lo < -180.) ? lo + 360. : lo
    return [la, lo]
}

To be fair, this algorithm does not look the same as what previously published, like here, which is instead what wikipedia references.
However, 3 is unclear at best, not specifying

what Nleap is and how to derive
How to derive Fraction of day (i would assume as ((h + (m/60.0) + (s/3600.0)) / 24.0) , but i can't be sure)
what Tgmt is and in what units it is expected to be given (hours? minutes? fraction of the day?)

Edit 3: the python algorithm (translated above into javascript) actually works reasonably well.
The issue i was having is that javascript getMonth returns values in the [0-11] range, while this method expects values in the [1-12] range.

**Tags:** the-sun, earth, mathematics
> **Comments:**
> **username_1**: It depends on your definition of simple and your math skills. There is a "simple" equation to calculate the Right Ascension of the Sun, a simple equation to calculate the Declination of the Sun, and a simple formula to calculate the Greenwich Mean Sidereal Time (GMST). Knowing those three values, the subsolar point can be calculated.  
> **username_2**: "And would the shadow circle of the earth be centered at the opposite point?" Draw or imagine a circle for Earth with a dot at Earth's center. Then draw/imagine a long straight line passing through the center. The two places where the line intersects the surface are indeed the closest point to the Sun and the center of Earths' shadow circle (actually a cylinder). Of course this model assumes a point Sun and spherical Earth but I think that's okay assuming we're looking for a "simple formula". In order to keep it simple, we also need Earth's orbit around the Sun to be circular as well.  
> **username_2**: With all those simplifications, we can get the lat/lon of f the *subsolar point* as a function of sidereal time with a simple [spherical triangle](https://en.wikipedia.org/wiki/Spherical_trigonometry) and then convert sidereal to UTC with one more simple equation. But these will indeed be approximations. There will be more complicated approximations in Jean Meeus' "Astronomical Algorithms" and/or "Astronomical Formulae for Calculators".  
> **username_3**: @uhoh Cylinder? Don't you mean cone? https://www.nasa.gov/audience/forstudents/k-4/stories/umbra-and-penumbra  
> **username_2**: @PM2Ring No I do not mean that. While "Of course this model assumes a point Sun and spherical Earth..." and "...Earth's orbit around the Sun to be circular as well..." would produce *an very gradually diverging conical umbra, the difference between that and a cylinder is way way smaller than the other effects also neglected by the level of approximation suggested in my comments trying to address the OP's request; "Is there a simple formula...? "  
> **username_3**: BTW, this is called the [subsolar point](https://en.wikipedia.org/wiki/Subsolar_point). Do you specifically want to calculate it yourself? You can get it from various websites, eg [Horizons](https://ssd.jpl.nasa.gov/api/horizons.api?format=text&MAKE_EPHEM=YES&EPHEM_TYPE=O&OBJ_DATA=NO&COMMAND=399&CENTER=%4010&QUANTITIES=14&START_TIME=2020-3-20&STOP_TIME=2020-3-21&STEP_SIZE=1h)  
> **username_0**: thanks all for the very useful replies. @PM2Ring yes i would like to calculate it myself  
> **username_0**: @PM2Ring thanks for the excellent pointer! one question, as layman: what exactly is jdn argument, j2000, (julian centuries, i would assume?) and how to derive these values?  Probably they are what we call normally something else, but i just wanted to double check. Also, i get name 'poly' is not defined. What would anyway be its javascript equivalent?  
> **username_0**: @PM2Ring found this resource https://equation-of-time.info/calculating-the-equation-of-time , would that be about right? (seems easier to translate into JS or other languages than porting poly())  
> **username_3**: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/138682/discussion-between-pm-2ring-and-pa).  
> **username_4**: Third document lists "$_{}$ is the number of leap years," apparently the count since 1/1/2000. Given how $T_{GMT}$ is used in that document, (subtract 12, multiply by 15, get a longitude) it looks to be Greenwich Mean Time in decimal hours.  

---

## 1 answers

### Answer by username_5 on 2022-08-25. Score: 3

In celestial navigation this point is called the Geographic Position (GP) of the Sun.  Since it is also useful to compute the GP of other bodies, I will give a general solution that applies to all RA/Dec coordinates.
Given the Right Ascension and Declination of an object, the GP of the body is:
$$
\begin{align*}
Latitude &= Declination \\
Longitude &= 360^\circ - (360^\circ - RA + GST)
\end{align*}
$$
Where GST in the Greenwich Sidereal Time.  For high accuracy, it is necessary to use Greenwich Apparent Sidereal Time, but since you asked for a simple formula, I will use Greenwich Mean Sidereal Time, which will still be accurate for recent times.
$$
\begin{align*} 
\theta &= 0.7790572732640 + 0.00273781191135448D_u + frac(JD(UT1)) \\
T &=\frac{JD_{UT1} - 2451545.0}{36525} \\
GMST &= \theta + 0.014506 + 4612.15739966T + 1.39667721T^2 + -0.00009344T^3 + 0.00001882T^4 \\
\end{align*}
$$
$ D_u $ = Number of WHOLE days of UT1 since J2000 (JD(UT1) – 2451545.0)
$ \theta $ = Earth Rotation Angle (in arcseconds)
T = Centuries of UT1 since J2000
GMST = Greenwich Mean Sidereal Time (in arcseconds)
The last piece of information needed is the RA/Dec of the Sun, the Astronomical Almanac provides probably the shortest useful algorithm for the position of the Sun, valid from 1950-2050.  If you want higher accuracy, or over a longer period of time, you'll need to use an ephemeris such as VSOP87.  Here is the algorithm implemented in JavaScript, and you can test it here
//Low precision sun position from Astronomical Almanac page C5 (2017 ed).
//Accuracy 1deg from 1950-2050
function sunPosition(jd)    {
    const torad=Math.PI/180.0;
    n=jd-2451545.0;
    L=(280.460+0.9856474*n)%360;
    g=((375.528+.9856003*n)%360)*torad;
    if(L<0){L+=360;}
    if(g<0){g+=Math.PI*2.0;}

    lamba=(L+1.915*Math.sin(g)+0.020*Math.sin(2*g))*torad;
    beta=0.0;
    eps=(23.439-0.0000004*n)*torad;
    ra=Math.atan2(Math.cos(eps)*Math.sin(lamba),Math.cos(lamba));
    dec=Math.asin(Math.sin(eps)*Math.sin(lamba));
    if(ra<0){ra+=Math.PI*2;}
    return [ra/torad/15.0,dec/torad];
}

A higher accuracy version would use the full reduction process explained in the Explanatory Supplement for the Astronomical Almanac which corrects for precession, nutation, aberration, parallax, polar motion, time scales, and more.
The Nautical Almanac enumerates the values with all of the corrections for several stars, the sun and planets with an accuracy of .1 arcminutes.
I have implemented this algorithm here, though it is not complete (I intend to add corrections for some of the effects producing an error greater than .1 arcminutes).  But it currently implements all of the parts mentioned above.

> **Comments:**
> **username_5**: The equation for the latitude can obviously be simplified, but I chose to show it as if converted directly from celestial navigation terminology where hour angles are used which are opposite from RA and longitude.  If you look at texts on celestial navigation, the way I've written it makes it more obvious as to what is going on.  
> **username_0**: Thanks for the nice answer! however, JD derivation technically is missing :-)  
> **username_0**: I found JD derivation method in your website. However, your solution also seem to produce different results compared to https://www.timeanddate.com/worldclock/sunearth.php , can you double check?  
> **username_5**: Seems to match within one degree which is within the accuracy of the Sun position algorithm.  I will eventually add VSPO87 to that page producing higher accuracy, but if you want "simple" it's going to be less accurate.  
> **username_0**: Right now, timeanddate reports On Friday, 26 August 2022, 15:02:00 UTC the Sun is at its zenith at Latitude: 10° 16' North, Longitude: 45° 03' West, your method [8.360038700401809,19.460248533502863], but in the evening the latitude error is greater even  
> **username_5**: Not sure where the [8.34...,19.4...] numbers came from.  Using 15:02UTC, my page reports the sun's position as +010° 22' 44.92" -045° 20' 25.26", and the TimeAndDate site reports Latitude: 10° 16' North, Longitude: 45° 03' West.  
> **username_0**: thanks, i had to double check, and i was getting the julian date calculation (not included in the snipped here) wrong. However, the longitude straight out of the function does not seem right.. I now finally found a solution (edited the question), but If you can please fix the answer including all that is necessary to get the right values out of the method starting with gregorian date, i will still accept the answer.  

---

