My answer will be the same as @MattGrum's, but I would like to add a teeny bit of explanation.
Say the diameter of the sun/moon is h, the distance is d and your lens' focal length is f. Assume that the image has come to a focus at a distance l behind the lens and has a diameter of i on the sensor.
If you quickly sketch out things assuming a thin lens you will find (by equal triangles) that
h / d = i / l
For large d the lens basically focuses at it's focal distance f so we can rewrite things as:
h / d = i / f
Now the tangent of the angle subtended by the object is given by
tan(theta) = h / d
When d >> h we can actually write
theta = h / d when theta is expressed in radians.
So we can say
i = f x theta
Now, from observation we see that theta = 0.5 degrees for the objects in question, which after proper conversion to radians leaves us with
i = f x 0.0087
i = f / 115