What are the lateral limits of Class D airspace in the USA? Class D airspace was normally 5sm (4.4nm) with extensions for approaches, when they are less than 2nm.  If any extension is over 2nm, then the extensions are normally Class E.  Many publications claim a 4nm Class D, but searching JO 7400.11A 1, there are many Class D airports with 4.2 or 4.4 or even greater lateral limits.

Some non-FAA publications claim that Class D is 4nm, but few Class D are in fact 4nm, most are larger, and many have extensions.  KFDK has a 5nm lateral limit for Class D, and Niagara Falls, KIAG has a 5nm lateral limit with an extension for approach.  Reading PA has a 4.2 and 4.8nm lateral limit depending on which side of the airport you are on.

My understanding that that Class D may be influenced by gradients for IFR operations, but also that Class D is frequently a customized airspace.

Furthermore, as an example, Class C airspace, when the radar is OTS (out of service) has the tower revert to Class D.  Will that be 4nm or 5sm?

Also, an operating federal control tower does not mean that an airport is Class D.  There are airports with towers which lack WX reporting, and are not Class D.  One which comes to mind in the past is LCQ, which is now KLCQ.  

So where is the definitive set of rules which define Class D?  

Where does a pilot obtain the lateral limits of Class D when Class C (or B) is not in place because of radar outage(s)?
JO 7400.2L, Procedures for Handling Airspace Matters, describes how the size of Class D airspace is determined. Per paragraph 17−2−5. DETERMINING CLASS D AREA
SIZE:

The size of a Class D area, and any necessary extensions, is determined 
by the use of a 200 feet per NM climb gradient and information obtained 
from the person responsible for developing instrument procedures (see 
FIG 17−2−1).


The figure lays out the formula for determining the radius and gives an example. In short, it depends on the distance from the airport reference point (ARP) or geographic position (GP) to the end of the outermost runway, and the terrain surrounding the airport. This is why the difference varies at different airports.