Advertisement
Advertisement
PHYSICS

Friction Factor Calculator — Darcy and Fanning

Solve the Colebrook equation for the Darcy–Weisbach friction factor from Reynolds number and relative roughness, and compare it against the Swamee–Jain and Haaland approximations.

If you already have a Reynolds number from elsewhere, use it. Otherwise the tool builds it from velocity, internal diameter and kinematic viscosity.
1.004 × 10⁻⁶ m²/s is water at 20 °C. Air at the same temperature is about 1.5 × 10⁻⁵, and light oils are two orders of magnitude higher than water.
Diameter is always used, because relative roughness is roughness divided by diameter. Drawn copper and plastic sit near 0.0015 mm, commercial steel near 0.045, galvanised steel near 0.15 and corroded cast iron at 0.26 or worse.
Laminar flow is always handled as 64 divided by Reynolds number regardless of this setting, because roughness has no effect below the transition.
Darcy friction factor
 
 
0
Fanning friction factor
0
Flow regime
0
Relative roughness
0
Spread across correlations
Tip: always check whether a formula wants the Darcy factor or the Fanning factor. They differ by a factor of four, and mixing them up is the single most expensive mistake in pipe hydraulics.
Advertisement

The friction factor calculator above produces the dimensionless number that governs how much energy a fluid loses rubbing along the inside of a pipe. It is the quantity people read off a Moody chart, and it is the term that turns velocity and pipe length into a pressure drop. This page solves for the factor itself and stops there, deliberately.

Arb Digital builds free tools that pick one job and finish it properly. If you want the pressure drop rather than the coefficient, the pipe flow calculator takes pipe geometry and fluid properties and returns velocity, flow rate and head loss, solving Colebrook internally on the way. This page is for when the friction factor is the answer you need — for a spreadsheet, a report, a design check, or a Moody chart you would rather not squint at.

What This Friction Factor Calculator Does

It solves the Colebrook–White equation by iteration for the Darcy friction factor, given a Reynolds number and a relative roughness. Colebrook is implicit — the unknown appears on both sides — so it cannot be rearranged into a closed form and has to be converged numerically. That is exactly why explicit approximations exist, and both of the well-known ones, Swamee–Jain and Haaland, are available here for comparison.

The Reynolds number can be entered directly or built from velocity, internal diameter and kinematic viscosity. Relative roughness is always built from an absolute roughness and a diameter, because that is how manufacturers publish it and because it is the ratio, not the absolute figure, that the equation cares about.

Two outputs matter beyond the headline. The Fanning friction factor is reported alongside the Darcy one, because different disciplines default to different conventions and the two differ by exactly four. And the spread across the three correlations is shown as a percentage, which is a useful reality check: when the explicit approximations agree with Colebrook to a fraction of a per cent, precision in the correlation is not your limiting factor.

How to Use It

  1. Establish the Reynolds number first. It decides which physics applies. Below about 2,300 the flow is laminar and roughness is irrelevant; above about 4,000 it is turbulent and roughness dominates.
  2. Use internal diameter, not nominal bore. Relative roughness is a ratio, so an error in diameter feeds straight into it, and pipe schedules change the bore substantially for the same label.
  3. Pick a roughness for the pipe's real condition. Published figures are for new pipe. Scale, corrosion and biofilm can raise the effective roughness by an order of magnitude over decades.
  4. Leave the correlation on Colebrook unless you have a reason. It is the reference the Moody chart was drawn from; the explicit forms exist for hand calculation and spreadsheets.
  5. Check which convention the next formula wants. Darcy–Weisbach wants the Darcy factor. Chemical engineering correlations frequently want Fanning.

The Formula: How the Friction Factor Is Calculated

In laminar flow the friction factor comes straight out of the exact solution for flow in a circular pipe, with no empiricism at all: f = 64 ÷ Re. Roughness does not appear, because the fluid layer against the wall is stationary and the flow never sees the surface texture.

In turbulent flow there is no exact solution and the standard reference is the Colebrook–White equation, an implicit relation: 1 ÷ √f = −2 log10[(ε/D) ÷ 3.7 + 2.51 ÷ (Re √f)]. Both bracketed terms matter for different reasons. The first is the roughness term, which dominates at high Reynolds numbers; the second is the viscous term, which dominates near the transition. OpenStax University Physics Volume 1, section 14.7 on viscosity and turbulence, sets out the Reynolds number that drives this and gives the laminar and turbulent thresholds.

Because f appears inside a logarithm on the right and as a square root on the left, the equation is solved by substitution: guess a value, evaluate the right-hand side, take the new f, repeat. It converges in a handful of passes. Swamee–Jain sidesteps this with f = 0.25 ÷ [log10((ε/D) ÷ 3.7 + 5.74 ÷ Re0.9)]², and Haaland with 1 ÷ √f = −1.8 log10[(ε/(3.7D))1.11 + 6.9 ÷ Re]. Both stay within about two per cent of Colebrook over the normal engineering range. The MIT OpenCourseWare Advanced Fluid Mechanics course covers the boundary layer behaviour these correlations are fitting.

Work the defaults. At Re = 100,000 with 0.045 mm roughness in a 100 mm pipe, the relative roughness is 0.00045. Iterating Colebrook converges on a Darcy factor of about 0.02012, which is a Fanning factor of 0.00503. Swamee–Jain gives 0.02020 for the same inputs, a difference of about 0.4 per cent.

Advertisement

Darcy Versus Fanning: A Factor of Four Waiting to Happen

Two friction factors are in common use and they are not close. The Darcy–Weisbach factor, sometimes called the Moody factor, is exactly four times the Fanning factor. Both are dimensionless, both are usually written f, and both appear in textbooks without a qualifier.

The difference comes from how each was defined. Fanning relates wall shear stress to the dynamic pressure of the flow. Darcy–Weisbach relates head loss over a pipe length to the same dynamic pressure, and the geometry of a circular pipe contributes a factor of four in the derivation. Fluid mechanics and civil engineering default to Darcy; chemical engineering, particularly in North America, frequently defaults to Fanning.

There is a fast sanity check that catches almost every case. In laminar flow the Darcy factor is 64 ÷ Re and the Fanning factor is 16 ÷ Re. If you can read a value off a chart at a known Reynolds number in the laminar region and it matches 64 ÷ Re, you have a Darcy chart. In turbulent water pipework the Darcy factor typically sits between 0.015 and 0.04; anything around 0.005 is a Fanning figure. Getting this wrong makes a calculated pressure drop out by four hundred per cent, in the safe or unsafe direction depending on which way you erred.

What Happens Between Re 2,300 and 4,000

The transition region is not a smooth handover, and no correlation describes it properly. Below roughly 2,300 the flow is reliably laminar. Above roughly 4,000 it is reliably turbulent. In between, the flow can be either, can switch back and forth, and depends on upstream disturbances, pipe vibration and entry geometry rather than on anything in the equation.

This tool reports the regime explicitly and, in the transition band, gives both the laminar and the turbulent value so you can see the size of the ambiguity. It is often large: at Re = 3,000 the laminar formula gives 0.0213 while Colebrook gives about 0.0439, more than double.

The practical answer in design work is to avoid the band. If a calculation lands there, treat the turbulent value as the conservative one for pressure drop, and be aware that the system may be unstable in a way that shows up as fluctuating flow rather than as a wrong number. The Reynolds number calculator is the place to check how far from the boundary a given design actually sits.

Why Roughness Stops Mattering, and Then Starts Mattering Completely

The two terms inside the Colebrook logarithm trade places as Reynolds number rises, and the behaviour at each end is quite different. At Reynolds numbers just above transition, the viscous sublayer against the wall is thick enough to bury the surface texture entirely. The pipe is hydraulically smooth: a rough pipe and a smooth pipe of the same diameter give nearly the same friction factor.

As velocity rises the sublayer thins. Once the roughness elements protrude through it, they start shedding eddies directly into the flow and the friction factor becomes almost independent of Reynolds number, settling on a value set by relative roughness alone. This is the fully rough regime, and it is why the right-hand side of a Moody chart is a fan of horizontal lines.

The design consequence is that in fully rough flow, pumping faster costs energy strictly in proportion to velocity squared, with no relief from the friction factor. It also means the roughness figure you assumed is doing all the work, so an old pipe with an effective roughness ten times its as-new value carries a materially higher loss that no amount of correlation precision will reveal. On the other hand, in the smooth regime, spending money on a smoother pipe buys almost nothing.

Need a website that loads fast and actually works?

Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.

Browse All Free Tools Talk to Arb Digital

Common Mistakes to Avoid

  • Mixing Darcy and Fanning factors — they differ by exactly four. Check against 64 ÷ Re in the laminar region to identify which convention a chart or formula uses.
  • Applying a turbulent correlation below Re 2,300 — laminar flow is 64 ÷ Re exactly and roughness plays no part at all, so Colebrook returns a meaningless number there.
  • Using nominal pipe size as the diameter — relative roughness is a ratio, so the wall thickness of the actual schedule changes the answer.
  • Taking new-pipe roughness for an old system — scaling and corrosion can raise effective roughness by a factor of ten, which dwarfs the difference between any two correlations.
  • Chasing correlation accuracy — Colebrook itself carries several per cent of scatter against the underlying data, so a result quoted to five figures is false precision.

Related Free Tools From Arb Digital

The friction factor is an input, not an end in itself, and the pipe flow calculator is where it turns into a pressure drop, velocity and flow rate for a real pipe run. To establish the Reynolds number that drives it, use the Reynolds number calculator. For flows that are genuinely laminar, the Poiseuille's law calculator gives the exact analytical result without any friction factor at all, and for water in ditches and channels rather than closed pipes the open channel flow calculator uses a different roughness formulation entirely. Volume and rate conversions are handled by the flow rate calculator, static head by the hydrostatic pressure calculator, and the full free online tools hub lists everything Arb Digital publishes.

Frequently Asked Questions

What is the difference between the Darcy and Fanning friction factors?

The Darcy factor is exactly four times the Fanning factor. Darcy–Weisbach relates head loss over a pipe length to dynamic pressure, while Fanning relates wall shear stress to it, and the geometry of a circular pipe supplies the factor of four.

What is the Colebrook equation?

It is the implicit relation that one over the square root of the friction factor equals minus two times the log of the relative roughness divided by 3.7 plus 2.51 divided by the Reynolds number times the square root of the friction factor. It has to be solved by iteration.

How accurate is Swamee-Jain compared with Colebrook?

Within about two per cent over the normal engineering range of Reynolds number and relative roughness, and often much closer than that. Since Colebrook itself carries several per cent of scatter against experiment, the difference rarely matters in design.

What is the friction factor for laminar flow?

Sixty-four divided by the Reynolds number, in Darcy terms, or sixteen divided by it in Fanning terms. This comes from the exact analytical solution for flow in a circular pipe, and surface roughness has no effect on it.

Why does roughness stop affecting the answer at low Reynolds numbers?

Because the viscous sublayer against the pipe wall is thick enough to bury the surface texture completely. The flow never touches the roughness elements, so the pipe behaves as if it were hydraulically smooth.

Which friction factor should I use between Re 2,300 and 4,000?

Neither is reliable there. The flow can be laminar or turbulent depending on upstream disturbances and pipe vibration, and the two values can differ by a factor of two. Treat the turbulent figure as the conservative one and design away from the band.

What roughness value should I use for steel pipe?

About 0.045 mm for new commercial steel, 0.15 mm for galvanised and 0.26 mm or worse for corroded cast iron. Published figures are for new pipe, and scaling over decades can raise the effective value by an order of magnitude.

This tool is provided for educational and estimating use. Empirical friction correlations carry inherent scatter and real pipe condition varies widely, so nothing on this page is a substitute for engineering design or safety assessment.

Advertisement
Advertisement

Take it further