We start with the formula for the area of the earth between a line of latitude and the north pole.
A = 2*pi*R*h
where R is the radius of the earth and h is the perpendicular distance from the plane containing the line of latitude to the pole. We can calculate h using trigonometry as
h = R*(1-sin(lat))
Thus the area north of a line of latitude is
A = 2*pi*R^2(1-sin(lat))
The area between two lines of latitude is the difference between the area north of one latitude and the area north of the other latitude:
A = |2*pi*R^2(1-sin(lat2)) - 2*pi*R^2(1-sin(lat1))|
= 2*pi*R^2 |sin(lat1) - sin(lat2)|
The area of a lat-long rectangle is proportional to the difference in the longitudes. The area I just calculated is the area between longitude lines differing by 360 degrees. Therefore the area we seek is
A = 2*pi*R^2 |sin(lat1)-sin(lat2)| |lon1-lon2|/360
= (pi/180)R^2 |sin(lat1)-sin(lat2)| |lon1-lon2|