Darcy-Weisbach Pipe Loss Calculator

Friction factor, head loss and pressure drop in a pipe.

  • Colebrook solved
  • Head loss and drop
  • Laminar to turbulent
A small rounded clay table with a soft clay pipe running downhill, one section rough and one smooth, and rounded standpipes of different heights along it.

The guide

Pipe loss turns on one number, the friction factor, and the equation for it solves itself

Why the Colebrook equation needs an iteration, how far the Haaland and Swamee-Jain shortcuts can miss, and why Reynolds numbers between 2,000 and 4,000 have no reliable answer.

  • 1.6119 m head loss in the worked example, 100 m of 0.1 m pipe
  • 0.019502 its Darcy friction factor, from the Colebrook equation
  • 127,324 its Reynolds number, so the flow is fully turbulent
  • 1.34 percent largest Haaland miss on the 36-point grid
  • 3.12 percent largest Swamee-Jain miss on the same grid
Read the full guide Fold the guide 7 min · 10 sources

Water pushed through a pipe loses pressure on the way. The loss grows with the length of the pipe, with the square of the speed, and with how rough the wall is. The Darcy-Weisbach equation puts all of that in one line, and nearly everything awkward about it hides in a single symbol, f, the Darcy friction factor. Most of the work in pipe calculation is the work of finding f honestly.

What the equation says

The Wikipedia page on the Darcy-Weisbach equation calls it an empirical relation between the head loss, or pressure loss, from viscous shear along a length of pipe and the average speed of an incompressible fluid. It is named for Henry Darcy and Julius Weisbach. Written out, the head loss h is f times L over D times V squared over twice g, where L is the length, D the inside diameter, V the average speed and g the acceleration of gravity.

Head is a height. The same page expresses the head loss as the equivalent height of a column of the working fluid, and the Hydraulic head page defines the pressure head as the pressure divided by the density and g. So the pressure drop is simply the density times g times the head loss. For g this page uses 9.80665 metres per second squared, the standard value that NIST lists with no uncertainty.

Take a pipe 0.1 m wide and 100 m long with a wall roughness of 0.045 mm, carrying 0.01 cubic metres of water per second. Use a density of 1000 kilograms per cubic metre and a kinematic viscosity of one millionth of a square metre per second. The area is 0.007854 square metres, so the speed is 1.27324 metres per second. The Reynolds number, speed times diameter over kinematic viscosity, is 127,324.

For that flow f is 0.019502. The head loss is then 1.6119 m, and the pressure drop is 15,807.7 Pa, about 15.81 kPa. Those figures come from the arithmetic on this page and agree with an independent run in Python, where the equation was solved with 50-digit arithmetic. The rest of this essay is about where 0.019502 comes from.

Laminar flow is the easy case

At a low Reynolds number the layers of fluid slide past each other smoothly. For laminar flow in a circular pipe the Darcy-Weisbach page gives f as 64 divided by the Reynolds number, and notes that the friction factor then depends on the Reynolds number alone. Roughness plays no part.

That formula is not a curve fitted to data. The Hagen-Poiseuille page describes a law for the pressure drop of an incompressible, Newtonian fluid, and the Darcy-Weisbach page says the laminar form is equivalent to the Hagen-Poiseuille equation, which is derived analytically from the Navier-Stokes equations. Put f equal to 64 over Re into the head-loss formula and the pressure drop becomes 128 times the dynamic viscosity times the length times the flow rate, over pi times the fourth power of the diameter.

A small test shows the two agree. Push 2 millilitres per second of a fluid with a dynamic viscosity of 0.001 pascal seconds through a pipe 1 cm wide and 5 m long. The Reynolds number is 254.65, and both routes give a pressure drop of 40.7437 Pa, equal to better than one part in a trillion. That agreement checks the tool; it is not a discovery.

Turbulence adds roughness, and the equation loops back on itself

Above a Reynolds number of 4,000 the Darcy friction factor formulae page treats the flow as fully turbulent and models rough pipes with the Colebrook-White equation. In its common form, one over the square root of f equals minus two times the base-10 logarithm of the relative roughness divided by 3.7, plus 2.51 divided by the Reynolds number times the square root of f.

Look again at that line. The friction factor appears on both sides. The page says the equation is usually solved numerically because it is implicit, and that is the whole difficulty: you cannot compute f without already knowing f.

The way out is to let x stand for one over the square root of f. The equation becomes x plus two times a logarithm, set equal to zero, with a single unknown. Newton’s method, which replaces a curve by its tangent line and takes the tangent’s zero as the next guess, finds the root quickly. Started from x equal to 7, it needed at most five steps on every test point here and stopped when x moved by less than 10 to the minus 14th.

There is also an exact route. A rearrangement turns the equation into the form w times e to the w equals a known number, and the Lambert W function is defined as the inverse of exactly that product. The Darcy friction factor page mentions that W gives an exact explicit form of the Colebrook equation. Newton’s method and the Lambert W form agreed with a 50-digit root to within 4 parts in 10 to the 16th on all 36 test points.

Roughness and Reynolds number together decide f. In 1944 Lewis Ferry Moody plotted the friction factor against the Reynolds number for several values of relative roughness, and the chart still bears his name. At a moderate Reynolds number each curve falls as the flow speeds up. Further right the curves flatten, and the factor depends on the roughness almost alone.

The size of the effect is easy to see. For the flow with a Reynolds number of 100,000, a smooth pipe has f of 0.01799. A pipe whose roughness is one thousandth of its diameter has 0.02217, about 23 percent higher, and the head loss rises by the same 23 percent.

How far the shortcuts miss

Because the Colebrook-White equation is implicit, explicit approximations of it exist. Two are common. The Haaland equation, proposed in 1983 by S. E. Haaland of the Norwegian Institute of Technology according to the Wikipedia page, gives one over the square root of f as minus 1.8 times a logarithm. The Swamee-Jain equation gives f directly as 0.25 over a logarithm squared. Both are approximations of the Colebrook-White equation.

How good are they? This page measured them on a grid of 36 cases: Reynolds numbers of 4,000, 10,000, 100,000, a million, 10 million and 100 million, each with relative roughness from one millionth to 0.05. Haaland never misses by more than 1.34 percent. Swamee-Jain never misses by more than 3.12 percent.

An earlier estimate put those limits at 1.3 and 3.1 percent. Recomputing them with 50-digit arithmetic in Python gives 1.344 and 3.122, so those are the figures used here. They were not close enough to the old round numbers to ignore.

The misses sit in different places. Haaland’s worst case is a Reynolds number of 100,000 with a relative roughness of 0.0001, where it comes out 1.34 percent too low. Swamee-Jain’s worst is a Reynolds number of 4,000 with a relative roughness of 0.01, where it is 3.12 percent too high.

For the worked example the Swamee-Jain friction factor is 0.019589, which is 0.45 percent above Colebrook. The Haaland value is 0.019261, which is 1.23 percent below. In head-loss terms that is 1.6192 m and 1.5920 m against 1.6119 m. For a rough estimate that is fine. For a number you will quote to someone else, solving the equation costs a handful of steps and removes the question.

Where the answer stops being reliable

Between laminar and turbulent lies a region where the flow cannot make up its mind. The Darcy friction factor formulae page places transitional flow between Reynolds numbers of 2,300 and 4,000 and says the friction factor is then subject to large uncertainties. The Reynolds number page says experiments on fully developed pipe flow find laminar flow below 2,300 and turbulent flow above 2,900, with flow in between that begins to turn turbulent and back at irregular intervals.

This page uses its own stated limits, 2,000 and 4,000, which are wider. Inside them it shows the laminar value and the turbulent value side by side and refuses to name either as the answer. Take a flow at a Reynolds number of 3,000. The laminar value of f is 0.02133 and the turbulent value is 0.04432, a ratio of 2.08. A tool that quietly picks one has made up its mind for the flow.

A chart read by eye has a similar problem. It gives a single friction factor with no hint of the uncertainty, and with no check that the number satisfies the equation. Here the solved value is substituted back into the Colebrook equation and the leftover, about 10 to the minus 15th, is printed, so a wrong constant or a wrong logarithm shows up at once. Using the natural logarithm gives f of 0.00462 where the correct base-10 answer is 0.02217.

The equation covers a full circular pipe carrying an incompressible, Newtonian fluid. It does not cover bends or valves, ducts that are not round, fluids whose viscosity changes with the rate of shear, gases moving fast enough to compress, or open channels. The page ships no table of fluid properties and no table of pipe roughness. You enter the density, the kinematic viscosity and the roughness, and the answer is only as good as those three numbers.

One practical detail: the chart, the flow table and the grid are made in a Web Worker, which MDN describes as a background thread separate from the main thread, so typing in a field never waits on them. The friction factor itself takes microseconds.

Sources

Every source consulted for this guide. Links checked November 10, 2026.

  1. Darcy-Weisbach equation Wikipedia
  2. Darcy friction factor formulae Wikipedia
  3. Hagen-Poiseuille equation Wikipedia
  4. Reynolds number Wikipedia
  5. Moody chart Wikipedia
  6. Lambert W function Wikipedia
  7. Newton's method Wikipedia
  8. Hydraulic head Wikipedia
  9. CODATA Value: standard acceleration of gravity National Institute of Standards and Technology
  10. Web Workers API MDN Web Docs (Mozilla)