What this calculator does
The Darcy friction factor is the dimensionless number that describes how much a pipe’s wall roughness and flow conditions resist flow, and it is the key term in the Darcy-Weisbach equation used to calculate pressure or head loss along a pipe run. This friction factor calculator solves for it directly from pipe roughness, internal diameter and Reynolds number.
The exact relationship (the Colebrook equation) is implicit, meaning the friction factor appears on both sides of the equation and has to be solved by iteration. To avoid that complexity and the risk of a slow or unstable iterative solver, this calculator uses the Swamee-Jain equation instead, a well-established explicit approximation that is accurate to within a few percent of the Colebrook solution across its stated validity range, without needing to guess and refine an answer.
The formula
For laminar flow (Reynolds number below 2,300), the friction factor formula equation is simply f = 64 / Re, and pipe roughness has no effect because the flow moves in smooth layers rather than mixing turbulently against the wall. For turbulent flow, this calculator applies the Swamee-Jain equation, f = 0.25 / [log10(ε/(3.7D) + 5.74/Re^0.9)]², using the relative roughness (roughness divided by diameter) and the Reynolds number. The Swamee-Jain equation is intended for turbulent flow with Re between about 5,000 and 10⁸, and the result is flagged if the Reynolds number falls in the unstable transitional band between 2,300 and 4,000.
| Term | Meaning |
|---|---|
| f | Darcy friction factor: a dimensionless number used in the Darcy-Weisbach head loss equation. |
| ε (epsilon) | Absolute pipe roughness: the average height of surface irregularities on the pipe wall. |
| D | Pipe internal diameter. |
| Re | Reynolds number: a dimensionless ratio describing whether flow is laminar or turbulent. |
| ε/D | Relative roughness: pipe roughness expressed as a fraction of the pipe diameter. |
The inputs explained
| Field | What to enter |
|---|---|
| Pipe roughness (ε) (mm) | The absolute roughness of the pipe material, for example around 0.045 mm for new commercial steel, or a value from a roughness reference table for other materials. |
| Pipe internal diameter (D) (mm) | The internal (bore) diameter of the pipe, not the outer diameter. |
| Reynolds number (Re) | The Reynolds number for the flow, calculated separately from velocity, diameter and the fluid’s kinematic viscosity. |
When to use it
Sizing pressure loss in a pipe run
The Darcy friction factor plugs directly into the Darcy-Weisbach equation alongside pipe length, diameter and flow velocity to work out head or pressure loss over a run of pipe.
Comparing pipe materials
Rougher materials such as older cast iron give a higher relative roughness and a higher friction factor than a smooth material like new PVC at the same diameter and flow, which is a big part of why pipe material choice affects pumping cost.
Checking whether flow is laminar or turbulent
Because the formula used depends entirely on whether the Reynolds number sits above or below 2,300, this calculator doubles as a quick check of which flow regime a given system is operating in.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does the friction factor change with Reynolds number?
A fixed pipe roughness and diameter across a range of Reynolds numbers, from laminar through to fully turbulent flow.
| Reynolds number | Darcy friction factor (f) | Flow regime |
|---|---|---|
| 1000 | 0.0640 | Laminar (Re below 2,300) |
| 2300 | 0.0491 | Transitional (2,300 - 4,000): the Swamee-Jain approximation is applied but real flow can be unstable in this range |
| 4000 | 0.0411 | Turbulent, close to the lower validity limit of the Swamee-Jain equation |
| 10000 | 0.0318 | Turbulent (Swamee-Jain equation) |
| 100000 | 0.0202 | Turbulent (Swamee-Jain equation) |
| 1000000 | 0.0170 | Turbulent (Swamee-Jain equation) |
How does pipe roughness change the friction factor?
The same turbulent flow through pipes of increasing wall roughness.
| Pipe roughness (ε) | Darcy friction factor (f) | Relative roughness (ε/D) |
|---|---|---|
| 0.0015 | 0.0180 | 0.000015 |
| 0.045 | 0.0202 | 0.000450 |
| 0.15 | 0.0239 | 0.0015 |
| 0.3 | 0.0277 | 0.0030 |
| 1 | 0.0388 | 0.0100 |
Questions
What is the Darcy friction factor formula?
For turbulent flow this calculator uses the Swamee-Jain equation, f = 0.25 / [log10(ε/(3.7D) + 5.74/Re^0.9)]², an explicit approximation of the implicit Colebrook equation. For laminar flow (Reynolds number under 2,300) the much simpler f = 64/Re applies instead.
What is the darcy friction factor formula’s valid range?
The Swamee-Jain equation used here is intended for turbulent flow with a Reynolds number roughly between 5,000 and 10⁸. Results between 2,300 and 5,000 are flagged, since flow in that band is close to or inside the unstable transitional region between laminar and turbulent.
Why not solve the Colebrook equation directly?
The Colebrook equation is implicit, meaning the friction factor appears on both sides and must be solved by trial and error or numerical iteration. The Swamee-Jain equation avoids that entirely and is accurate to within a few percent of the Colebrook solution across its stated range, which is accurate enough for almost all practical pipe design work.
Does pipe roughness matter for laminar flow?
No. In laminar flow the fluid moves in smooth, ordered layers that never really touch the wall roughness in a way that changes resistance, so the friction factor depends only on the Reynolds number (f = 64/Re) and roughness drops out of the calculation entirely.
Once you have the friction factor, the pipe friction loss calculator (using the Hazen-Williams method) works out head and pressure loss for a full pipe run.