When I was a kid my parents bought me a book called “practical astronomy with your calculator” that went over all the workings and formulae for calculating eclipses, moon phases, locations of the planets and heaps more. If you want to get into it I highly recommend this book or something similar.