Meters per second (m/s)
Feet per second (ft/s)
Kilometers per hour (km/h)
Miles per hour (mph)
Please enter valid positive numbers for both diameter and velocity.
Calculation Results
Volumetric Flow Rate (m³/h):–
Liters per Minute (L/min):–
Liters per Second (L/s):–
US Gallons per Minute (GPM):–
Cubic Feet per Second (cfs):–
Cross-Sectional Area:0 m²
Formula to Calculate Flow Rate Through a Pipe
Understanding how to calculate the flow rate of a fluid through a pipe is fundamental in fields ranging from civil engineering and hydraulics to home plumbing and irrigation. The volumetric flow rate measures the volume of fluid that passes through a cross-section of the pipe over a specific period.
Q = A × v
Where:
Q = Volumetric Flow Rate (e.g., m³/s)
A = Cross-Sectional Area of the pipe (e.g., m²)
v = Velocity of the fluid (e.g., m/s)
Step-by-Step Calculation Logic
To use this formula manually, you must ensure your units are consistent. The standard approach involves these steps:
Determine the Internal Diameter: Measure the inside diameter of the pipe ($d$). If you have the outer diameter, you must subtract twice the wall thickness.
Calculate the Cross-Sectional Area: Since pipes are circular, use the circle area formula:
A = π × (d / 2)² or A = (π × d²) / 4.
Multiply by Velocity: Multiply the calculated area ($A$) by the average velocity of the fluid ($v$) to get the flow rate ($Q$).
Practical Example
Let's calculate the flow rate for a water pipe with an internal diameter of 100 mm (0.1 meters) carrying water moving at 2 meters per second.
1. Calculate Area (A):
Radius (r) = 0.1 m / 2 = 0.05 m
A = 3.14159 × (0.05)² = 0.007854 m²
2. Calculate Flow (Q):
Q = 0.007854 m² × 2 m/s = 0.0157 m³/s
To convert this to more common units:
Liters per minute: 0.0157 × 60,000 ≈ 942 L/min
Cubic meters per hour: 0.0157 × 3,600 ≈ 56.5 m³/h
Why Flow Rate Matters
Correctly calculating flow rate is essential for sizing pumps, determining the efficiency of HVAC systems, and designing water supply networks. If the velocity is too high, it can cause pipe erosion and noise (water hammer). If the velocity is too low, suspended solids may settle and clog the pipe.
function calculatePipeFlow() {
// 1. Get Inputs
var diameterInput = document.getElementById('pipeDiameter').value;
var diameterUnit = document.getElementById('diameterUnit').value;
var velocityInput = document.getElementById('fluidVelocity').value;
var velocityUnit = document.getElementById('velocityUnit').value;
var errorDiv = document.getElementById('errorMessage');
var resultsDiv = document.getElementById('flowResults');
// 2. Validate Inputs
var diameter = parseFloat(diameterInput);
var velocity = parseFloat(velocityInput);
if (isNaN(diameter) || isNaN(velocity) || diameter <= 0 || velocity < 0) {
errorDiv.style.display = 'block';
resultsDiv.style.display = 'none';
return;
}
errorDiv.style.display = 'none';
// 3. Normalize to SI Units (Meters for Distance, Seconds for Time)
// Convert Diameter to Meters
var diameterInMeters = 0;
if (diameterUnit === 'mm') {
diameterInMeters = diameter / 1000;
} else if (diameterUnit === 'cm') {
diameterInMeters = diameter / 100;
} else if (diameterUnit === 'm') {
diameterInMeters = diameter;
} else if (diameterUnit === 'in') {
diameterInMeters = diameter * 0.0254;
} else if (diameterUnit === 'ft') {
diameterInMeters = diameter * 0.3048;
}
// Convert Velocity to Meters per Second (m/s)
var velocityInMps = 0;
if (velocityUnit === 'ms') {
velocityInMps = velocity;
} else if (velocityUnit === 'fts') {
velocityInMps = velocity * 0.3048;
} else if (velocityUnit === 'kmh') {
velocityInMps = velocity / 3.6;
} else if (velocityUnit === 'mph') {
velocityInMps = velocity * 0.44704;
}
// 4. Perform Calculation (Continuity Equation Q = A * v)
// Area = pi * r^2 = pi * (d/2)^2
var radius = diameterInMeters / 2;
var area = Math.PI * Math.pow(radius, 2); // Area in square meters
// Flow Rate in Cubic Meters per Second (Base Unit)
var flowM3s = area * velocityInMps;
// 5. Convert Results to Target Units
var flowM3h = flowM3s * 3600; // Cubic meters per hour
var flowLpm = flowM3s * 60000; // Liters per minute
var flowLps = flowM3s * 1000; // Liters per second
var flowGpm = flowM3s * 15850.3231; // US Gallons per minute
var flowCfs = flowM3s * 35.3147; // Cubic feet per second
// 6. Display Results
resultsDiv.style.display = 'block';
// Formatting numbers (using toLocaleString for readability or toFixed for precision)
document.getElementById('resM3h').innerText = flowM3h.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 4});
document.getElementById('resLpm').innerText = flowLpm.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('resLps').innerText = flowLps.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 4});
document.getElementById('resGpm').innerText = flowGpm.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById('resCfs').innerText = flowCfs.toLocaleString(undefined, {minimumFractionDigits: 4, maximumFractionDigits: 4});
document.getElementById('resArea').innerText = area.toExponential(4);
}