m/s (Meters per sec)
ft/s (Feet per sec)
in/s (Inches per sec)
km/h (Kilometers per hour)
mm (Millimeters)
cm (Centimeters)
m (Meters)
in (Inches)
ft (Feet)
Volumetric Flow Rate (Q):–
Cubic Meters per Hour:–
Liters per Minute:–
US Gallons per Minute (GPM):–
Cubic Feet per Second (CFS):–
Calculated Pipe Area:–
function calculateFlowRate() {
// 1. Get Elements
var vInput = document.getElementById('velocityInput').value;
var vUnit = document.getElementById('velocityUnit').value;
var dInput = document.getElementById('diameterInput').value;
var dUnit = document.getElementById('diameterUnit').value;
var errorDiv = document.getElementById('errorDisplay');
var resultDiv = document.getElementById('results-area');
// 2. Validation
if (vInput === "" || dInput === "" || isNaN(vInput) || isNaN(dInput)) {
errorDiv.style.display = "block";
errorDiv.innerHTML = "Please enter valid numeric values for both velocity and diameter.";
resultDiv.style.display = "none";
return;
}
var v = parseFloat(vInput);
var d = parseFloat(dInput);
if (v < 0 || d <= 0) {
errorDiv.style.display = "block";
errorDiv.innerHTML = "Diameter must be positive and velocity cannot be negative.";
resultDiv.style.display = "none";
return;
}
errorDiv.style.display = "none";
resultDiv.style.display = "block";
// 3. Normalization (Convert everything to Standard SI Units: Meters and Seconds)
// Convert Diameter to Meters
var diameterInMeters = 0;
if (dUnit === "mm") diameterInMeters = d / 1000;
else if (dUnit === "cm") diameterInMeters = d / 100;
else if (dUnit === "m") diameterInMeters = d;
else if (dUnit === "in") diameterInMeters = d * 0.0254;
else if (dUnit === "ft") diameterInMeters = d * 0.3048;
// Convert Velocity to Meters per Second (m/s)
var velocityInMPS = 0;
if (vUnit === "m_s") velocityInMPS = v;
else if (vUnit === "ft_s") velocityInMPS = v * 0.3048;
else if (vUnit === "in_s") velocityInMPS = v * 0.0254;
else if (vUnit === "km_h") velocityInMPS = v / 3.6;
// 4. Calculation Logic
// Area = pi * (d/2)^2 = pi * r^2
var radius = diameterInMeters / 2;
var areaM2 = Math.PI * Math.pow(radius, 2);
// Flow Rate Q = v * A (m/s * m^2 = m^3/s)
var qMPS = velocityInMPS * areaM2;
// 5. Convert Results
var m3h = qMPS * 3600; // Cubic meters per hour
var lpm = qMPS * 60000; // Liters per minute
var gpm = qMPS * 15850.3231; // US Gallons per minute
var cfs = qMPS * 35.3147; // Cubic feet per second
// 6. Display Results
// Determine main unit display based on input unit preference (Generic logic)
// If inputs were imperial, show CFS as main, else show m3/s
var mainResultText = "";
if (vUnit === "ft_s" || dUnit === "in" || dUnit === "ft") {
mainResultText = cfs.toFixed(4) + " ft³/s";
} else {
mainResultText = qMPS.toFixed(5) + " m³/s";
}
document.getElementById('mainResult').innerHTML = mainResultText;
document.getElementById('resM3H').innerHTML = m3h.toFixed(3) + " m³/h";
document.getElementById('resLPM').innerHTML = lpm.toFixed(2) + " L/min";
document.getElementById('resGPM').innerHTML = gpm.toFixed(2) + " gal/min";
document.getElementById('resCFS').innerHTML = cfs.toFixed(4) + " ft³/s";
// Display Area
var areaDisplay = "";
if (dUnit === "in" || dUnit === "ft") {
// Convert m2 to sq inches
var areaSqIn = areaM2 * 1550.0031;
areaDisplay = areaSqIn.toFixed(2) + " in²";
} else {
// Show in cm2 or m2
if (areaM2 < 1) {
areaDisplay = (areaM2 * 10000).toFixed(2) + " cm²";
} else {
areaDisplay = areaM2.toFixed(4) + " m²";
}
}
document.getElementById('resArea').innerHTML = areaDisplay;
}
How to Convert Flow Velocity to Flow Rate
Understanding the relationship between flow velocity and volumetric flow rate is fundamental in fluid dynamics, plumbing, civil engineering, and HVAC systems. This calculator uses the Continuity Equation to determine how much fluid passes through a pipe based on how fast it is moving and the size of the pipe.
The Flow Rate Formula
The calculation is based on the fundamental continuity equation for incompressible fluids:
Q = A × v
Where:
Q = Volumetric Flow Rate (e.g., m³/s, GPM)
A = Cross-Sectional Area of the pipe (e.g., m², in²)
v = Flow Velocity (e.g., m/s, ft/s)
Calculating Cross-Sectional Area
Since most pipes are circular, the area (A) is calculated using the internal diameter (d) of the pipe:
Area Formula: A = π × (d / 2)² or A = (π × d²) / 4
Example Calculation
Let's say you have water flowing through a pipe with the following parameters:
Pipe Diameter: 100 mm (0.1 meters)
Flow Velocity: 2.0 meters per second
Step 1: Calculate Area
Radius (r) = 0.1m / 2 = 0.05m
Area (A) = π × (0.05)² ≈ 0.007854 m²
Step 2: Calculate Flow Rate
Q = 0.007854 m² × 2.0 m/s = 0.0157 m³/s
Converting this to Liters per Minute: 0.0157 × 60,000 ≈ 942 L/min.
Why is this important?
High flow velocities can cause noise, erosion, and increased pressure drop (friction loss) in piping systems. Conversely, velocities that are too low may allow sediment to settle in the pipe. Engineers use this calculation to size pumps and pipes correctly to maintain efficient system performance.