Colebrook Friction Factor Calculator

Solve the Colebrook equation iteratively for the Darcy friction factor of a turbulent pipe flow.

Physics and EnergyUpdated 2026-11-203 min read
Colebrook Friction Factor Calculator
Wall roughness height divided by pipe internal diameter.
Darcy friction factor
...
Iterations used...
Flow regime...

What it does

The Darcy friction factor is used in the Darcy-Weisbach equation to compute pressure loss in a pipe. For laminar flow it has a simple closed form. For turbulent flow it depends on both the Reynolds number and the relative roughness of the wall, and the standard relation is implicit, meaning the friction factor appears on both sides.

The Colebrook equation combines the smooth pipe and fully rough limits into one expression. It uses the constants 3.7 and 2.51 with a base ten logarithm. Because the unknown appears inside and outside the log, the tool solves it by fixed point iteration starting from a guessed value and stopping when successive values agree closely.

The iteration guard limits the attempt to a few hundred steps. That keeps the tool responsive even for awkward inputs. The friction factor printed is the Darcy factor, which is four times the Fanning factor that some textbooks use.

A smooth pipe has relative roughness near zero. As roughness increases, the friction factor rises and approaches a value independent of Reynolds number. The tool accepts relative roughness from zero up to 0.1, which covers very rough small pipes.

The correlation is meant for fully developed turbulent flow. Near the transition between laminar and turbulent flow the result is uncertain, and below the turbulent range the tool rejects the input rather than return a misleading value.

How to use

  1. Compute or obtain the Reynolds number for the pipe flow.
  2. Compute relative roughness as wall roughness height divided by pipe diameter.
  3. Enter both values in the tool.
  4. Read the Darcy friction factor and the number of iterations used.
  5. Use the factor in the Darcy-Weisbach equation for pressure loss.
  6. Do not apply the result outside the turbulent range.

Formula

1 / sqrt(f) = -2 x log10( e/(3.7 D) + 2.51 / (Re x sqrt(f)) ).
f
Darcy friction factor, dimensionless.
e/D
Relative roughness, wall roughness height divided by pipe diameter.
Re
Reynolds number, set by velocity, diameter and viscosity.
log10
Base ten logarithm, not the natural logarithm.

The tool iterates from an initial guess of 0.02 until the change is below a tight tolerance or the iteration guard is reached. If the terms inside the logarithm become invalid, the tool returns an error. The result is the Darcy factor; multiply by one quarter if you need the Fanning factor.

Worked example

Example: Re = 1,000,000 and e/D = 0.0002

Defaults: Reynolds number 1,000,000 and relative roughness 0.0002.

  1. Start with an initial friction factor guess of 0.02.
  2. Evaluate the right hand side using 3.7 and 2.51.
  3. Solve for a new value of f from the resulting 1 over square root term.
  4. Repeat until successive values agree within tolerance.
  5. The iteration settles at 0.01468 after 8 steps.
  6. The tool shows 0.01468, 8 and Turbulent.

Reference table

Friction factor at Re = 1,000,000 for several roughness values
Relative roughnessDarcy fInterpretation
0.00000.0116Hydraulically smooth
0.00020.0147Default example
0.00100.0199Moderately rough
0.01000.0374Very rough

Limits

  • Applies to fully developed turbulent pipe flow above the transition range.
  • Uses the Darcy friction factor, not the Fanning factor.
  • Assumes a single equivalent roughness height for the wall.
  • The iteration is a numerical approximation, though it converges quickly for normal inputs.

Common mistakes

  • Using the Fanning friction factor where the Darcy factor is required.
  • Entering absolute roughness instead of relative roughness.
  • Applying the equation in the laminar range.
  • Using natural log instead of base ten log when checking by hand.
  • Expecting the friction factor to depend only on Reynolds number for a rough pipe.

Try it yourself

Quick checks. Answers sit tucked under each question.

Re 100,000 and e/D 0.001. What does the tool show?

The iteration converges to a Darcy friction factor of 0.02217 after 9 steps, with flow regime Turbulent.

What happens below Re 4000?

The tool returns the error Enter a Reynolds number between 4,000 and 1,000,000,000, because the Colebrook correlation is not reliable there.

Why does the equation need iteration?

The friction factor appears both outside the logarithm as one over square root f and inside the logarithmic term, so it cannot be isolated algebraically.

Questions

What is the Colebrook equation?

An implicit relation for the Darcy friction factor in turbulent pipe flow as a function of Reynolds number and relative roughness.

Why use it instead of the Moody chart?

It gives the same information as the chart in a form a computer can solve directly.

What is relative roughness?

The average height of wall roughness divided by the pipe internal diameter, so it is dimensionless.

What is the difference between Darcy and Fanning factors?

The Darcy factor is four times the Fanning factor. This tool returns the Darcy factor.

Does roughness matter at low Reynolds number?

Much less. In laminar flow the friction factor depends only on Reynolds number and roughness has no effect.

How many iterations are typical?

Around eight to ten for ordinary inputs, because the fixed point iteration converges rapidly.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.