Depending on one's need for accuracy, there are any number of ways to calculate the Equation of Time. Wikipedia's EoT page and its Analemma page give a number of these. The simplest rely on the fact that both the Eccentricity and Obliquity effects are almost sine curves. Others are Fourier-based solutions. Finally there are those that use sound astronomical methods. Here you will find an example each method.

WHY BOTHER TO CALCULATE AT ALL...

a poem by Tad Dunne

VERY SIMPLE METHOD

SIMPLE METHOD

This method is adapted from the Astronomical Almanac and is accurate to +/- 6 seconds between 1950 and 2050

FOURIER METHOD

This method took many, many EoT calculations from a sophisticated astronomical package (MICA from the US Naval Observatory) and subjected those values to rigorous Fourier analysis. This gives accurate and easily calculable

ASTRONOMICAL METHOD

This method is adapted from Practical Astronomy with your Calculator by Peter Duffett-Smith

FURTHER DETAILS ON CALCULATING THE ELLIPTICITY EFFECT

MEEUS' ALGORITHMS

The most complete 'non-professional' algorithms for calculation of the Equation of Time are provided in by Jan Meeus - Astronomical Algorithms (1998), 2nd ed - ISBN 0-943396-61-1.

You can view the author's Javascript implementation of Meeus' algorithms for the Sun here. If you would like to use these algorithms, contact the author, who would be happy to send you a text file.

OTHER SOURCES

For more information of the astronomical background of the Equation of Time, see the article below which was published in NASS Compendium : Vol 25 Nos 3 & 4, Sept & Dec 2018. (Including some corrections for the published text)

MICA

From the US Naval Observatory, this is a relatively cheap program that provides everything that an serious amateur astronomer, gnomonist or navigator might need. N,B. The Mac version of MICA does NOT work under Apple OSX Catalina.

HORIZONS

This is the program, in whose user guide, it states that the user should consult the web-master if using the program for manned planetary landings. It is a little bit cumbersome to use, at first. But once used a few times, it is quite straight-forward. It is lightening fast, free and the best that there is.