Friction factor
The friction factor is a dimensionless number, which is used in the mechanical energy balance to relate the head loss or pressure loss along a given length of pipe to the average velocity of a viscous fluid.
There are two friction factors: The Darcy friction factor and the Fanning friction factor . The Darcy friction factor is 4 times the value of the Fanning friction factor.
Introduction to friction factor
The loss of mechanical energy per unit time due to flow of a viscous fluid is

(1) 
Unfortunately, the details of the flow velocity is only exactly known in relatively simple situations, such as laminar flow. As a result, we use correlations to determine the dependence of the viscous loss on measurable variables. For flow in pipes,

(2) 
where is the DarcyWeisbach friction factor. Expressed in terms of head, the above equation becomes

(3) 
The Moody chart or Moody diagram is a graph in nondimensional form that relates the Darcy friction factor, Reynolds number, and surface roughness for fully developed flow in a circular pipe. It is based on thousands of experiments, and the accuracy is about ±5% for smooth pipes and ±10% for rough pipes. According to the chart there are three regimes: laminar, transition, and turbulent flow.
Laminar flow
Laminar flow is the passing of fluid particles onto even layers passing each other without mixing. Flow with a Reynolds number less that 2100 is classified as laminar flow. In this regime,

(4) 
and the friction factor is independent of pipe roughness.
Transition flow
Transition (neither fully laminar nor fully turbulent) flow occurs in the range of Reynolds numbers between 2100 and 4000. The value of the Darcy friction factor is subject to large uncertainties in this flow regime.
Turbulent flow
Blasius Correlation Equation
The Blasius correlation is the simplest equation for computing the Darcy friction factor. Because the Blasius correlation has no term for pipe roughness, it is valid only to smooth pipes. However, the Blasius correlation is sometimes used in rough pipes because of its simplicity. The Blasius Correlation was proposed in 1913.

(5) 
The Blasius correlation is valid for Reynolds number greater than 4000.
ColebrookWhite Equation
The Darcy friction factor for fully turbulent flow (Reynolds number greater than 4000) can be modeled by the Colebrook–White equation:

(6) 
The Colebrook equation is usually solved numerically due to its implicit nature, but can be approximated by simpler explicit forms.
Haaland Equation
The Haaland is an approximation of the implicit Colebrook–White equation, but the discrepancy from experimental data is well within the accuracy of the data.

(8) 
No matter which equation is used to model the data on the Moody diagram, a check should always be made to see how close the model is to the actual value of on the Moody diagram.
Darcy friction factor vs Fanning friction factor
The Darcy friction factor, , is 4 times larger than the Fanning friction factor, , so attention must be paid to note which one of these is meant in any "friction factor" chart or equation being used. Of the two, the Darcy factor, , is more commonly used by civil and mechanical engineers, and the Fanning factor, , by chemical engineers, but care should be taken to identify the correct factor regardless of the source of the chart or formula. Most charts or tables indicate the type of friction factor, or at least provide the formula for the friction factor with laminar flow. If the formula for laminar flow is , it's the Fanning friction factor, and if the formula for laminar flow is , it's the Darcy friction factor.

(7) 
Which friction factor is plotted in a Moody diagram may be determined by inspection if the publisher did not include the formula described above: Observe the value of the friction factor for laminar flow at a Reynolds number of 1000. If the value of the friction factor is 0.064, then the Darcy friction factor is plotted in the Moody diagram. If the value of the friction factor is 0.016, then the Fanning friction factor is plotted in the Moody diagram.