Calculate Volumetric Flow Rate, Fluid Velocity, or Pipe Diameter.
Flow Rate (Q)
Velocity (v)
Pipe Diameter (d)
mm
inches
meters
feet
m/s
ft/s
km/h
mph
m³/h
L/min
GPM (US)
ft³/s
m³/s
Calculation Results
Understanding Velocity and Flow Rate
In fluid dynamics and engineering, understanding the relationship between the size of a pipe, the speed at which fluid moves, and the total volume of fluid delivered is critical. Whether you are designing an HVAC system, sizing a pump for an irrigation network, or managing industrial wastewater, the connection between Flow Rate (Q), Velocity (v), and Area (A) is the foundation of your calculations.
The Fundamental Formula
The continuity equation describes the relationship between these three variables:
Q = A × v
Q (Flow Rate): The volume of fluid passing a point per unit of time (e.g., cubic meters per second, gallons per minute).
A (Area): The cross-sectional area of the pipe or channel. For a round pipe, A = π × (d/2)².
v (Velocity): The speed at which the fluid particles are moving (e.g., meters per second, feet per second).
How to Use This Calculator
This tool allows you to solve for any of the three main variables as long as you know the other two. It handles unit conversions automatically, allowing you to input pipe diameters in inches while reading velocity in meters per second.
1. Calculating Flow Rate
Select "Flow Rate (Q)" if you know the size of your pipe and the velocity of the fluid. This is common when estimating the capacity of an existing system.
2. Calculating Velocity
Select "Velocity (v)" if you know your target flow rate and the pipe size. This is crucial for checking if flow velocity is too high (causing noise and erosion) or too low (causing sedimentation).
3. Calculating Pipe Diameter
Select "Pipe Diameter (d)" if you have a target flow rate and a desired velocity limit. This helps in sizing pipes during the design phase.
Common Recommended Velocities
Designing a system often requires staying within specific velocity ranges to prevent damage or inefficiency:
Water Supply (General): 1.0 to 2.5 m/s (3 to 8 ft/s).
Pump Suction: 0.6 to 1.2 m/s (2 to 4 ft/s) to prevent cavitation.
Drainage/Sewer: Minimum 0.6 m/s (2 ft/s) to ensure self-cleaning.
Example Calculation
Imagine you have a 4-inch pipe and water is flowing through it at 2.5 meters per second.
First, convert the diameter to meters: 4 inches ≈ 0.1016 meters.
Calculate the Area: A = π × (0.1016 / 2)² ≈ 0.008107 m².
Calculate Flow Rate: Q = 0.008107 m² × 2.5 m/s ≈ 0.02027 m³/s.
Convert to common units: This equals roughly 72.9 m³/h or 321 GPM.
function toggleInputs() {
var mode = document.getElementById('calcMode').value;
var groupDiameter = document.getElementById('groupDiameter');
var groupVelocity = document.getElementById('groupVelocity');
var groupFlow = document.getElementById('groupFlow');
var resultContainer = document.getElementById('resultContainer');
// Reset display
groupDiameter.style.display = 'block';
groupVelocity.style.display = 'block';
groupFlow.style.display = 'block';
resultContainer.style.display = 'none';
if (mode === 'flow') {
groupFlow.style.display = 'none';
} else if (mode === 'velocity') {
groupVelocity.style.display = 'none';
} else if (mode === 'diameter') {
groupDiameter.style.display = 'none';
}
}
// Initialize state
toggleInputs();
function calculatePhysics() {
var mode = document.getElementById('calcMode').value;
var resultHTML = "";
var secondaryHTML = "";
// Helper: Convert to Base SI Units (m, m/s, m3/s)
// 1. Get Values
var dVal = parseFloat(document.getElementById('inputDiameter').value);
var dUnit = document.getElementById('unitDiameter').value;
var vVal = parseFloat(document.getElementById('inputVelocity').value);
var vUnit = document.getElementById('unitVelocity').value;
var qVal = parseFloat(document.getElementById('inputFlow').value);
var qUnit = document.getElementById('unitFlow').value;
// Base Variables (SI)
var diameterMeters = 0;
var velocityMS = 0;
var flowM3S = 0;
// 2. Normalize Inputs to SI
if (mode !== 'diameter') {
if (isNaN(dVal)) { alert("Please enter a valid Pipe Diameter."); return; }
if (dUnit === 'mm') diameterMeters = dVal / 1000;
else if (dUnit === 'in') diameterMeters = dVal * 0.0254;
else if (dUnit === 'm') diameterMeters = dVal;
else if (dUnit === 'ft') diameterMeters = dVal * 0.3048;
}
if (mode !== 'velocity') {
if (isNaN(vVal)) { alert("Please enter a valid Velocity."); return; }
if (vUnit === 'ms') velocityMS = vVal;
else if (vUnit === 'fts') velocityMS = vVal * 0.3048;
else if (vUnit === 'kmh') velocityMS = vVal / 3.6;
else if (vUnit === 'mph') velocityMS = vVal * 0.44704;
}
if (mode !== 'flow') {
if (isNaN(qVal)) { alert("Please enter a valid Flow Rate."); return; }
if (qUnit === 'm3s') flowM3S = qVal;
else if (qUnit === 'm3h') flowM3S = qVal / 3600;
else if (qUnit === 'lmin') flowM3S = qVal / 60000;
else if (qUnit === 'gpm') flowM3S = qVal * 0.0000630901964;
else if (qUnit === 'cfs') flowM3S = qVal * 0.0283168;
}
// 3. Perform Calculation
if (mode === 'flow') {
// Q = A * v
var area = Math.PI * Math.pow((diameterMeters / 2), 2);
flowM3S = area * velocityMS;
// Format Results
var m3h = flowM3S * 3600;
var lmin = flowM3S * 60000;
var gpm = flowM3S * 15850.3231;
resultHTML = "Flow Rate: " + m3h.toFixed(2) + " m³/h";
secondaryHTML += "
Liters per minute:" + lmin.toFixed(2) + " L/min
";
secondaryHTML += "
US Gallons per minute:" + gpm.toFixed(2) + " GPM
";
secondaryHTML += "
Cubic meters per second:" + flowM3S.toFixed(5) + " m³/s
";
}
else if (mode === 'velocity') {
// v = Q / A
var area = Math.PI * Math.pow((diameterMeters / 2), 2);
if (area === 0) { alert("Diameter cannot be zero."); return; }
velocityMS = flowM3S / area;
var fts = velocityMS * 3.28084;
var kmh = velocityMS * 3.6;
resultHTML = "Velocity: " + velocityMS.toFixed(2) + " m/s";
secondaryHTML += "
Feet per second:" + fts.toFixed(2) + " ft/s
";
secondaryHTML += "
Kilometers per hour:" + kmh.toFixed(2) + " km/h
";
}
else if (mode === 'diameter') {
// A = Q / v
// d = 2 * sqrt(A / PI)
if (velocityMS === 0) { alert("Velocity cannot be zero."); return; }
var area = flowM3S / velocityMS;
diameterMeters = 2 * Math.sqrt(area / Math.PI);
var d_mm = diameterMeters * 1000;
var d_in = diameterMeters * 39.3701;
resultHTML = "Required Inner Diameter: " + d_mm.toFixed(2) + " mm";
secondaryHTML += "