Lonely Spec is a great site for astrophotography, and they have a great guide to lenses[a] that are suitable for astrophotography.

But the calculations have two issues:

They are done assuming a sensor size of 24 mm x 16 mm, but proceed to use the 500 / focal length approximation when computing the exposure time. The end result is that you get a mixture of full-frame and APS-C values that don't correctly describe the performance of the lens.

They don't take into account the performance of the lens when combined with a suitable camera. The camera's sensor size is one variable that is ignored - but Lonely Speck also ignores the low-light performance of the sensor. Attaching a high-performance lens to an iPhone[b] will give you different results compared to attaching it to a DSLR.

I have therefore written this little lens and camera score calculator. Input the focal length of the lens (as written on the lens, not the "35mm equivalent"), the maximum aperture, select the sensor you will be using it with, and the DxOMark ISO score, and press the button. It will give you a score for the lens based on the same formula as Lonely Speck uses, but with correct sensor sizes, and a total score for the lens-camera system. The formula used for the lens is lens score = (angular area) × (aperture area) × (exposure time), and the total lens-and-camera score is combined score = (lens score) × log2(DxOMark ISO score).

The special sensor "Lonely Speck" forces the calculator to use the Lonely Speck way of calculating the lens score, with an APS-C sized sensor, but with an exposure time of 500 / focal length.