.calc-container {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
max-width: 800px;
margin: 20px auto;
padding: 25px;
border: 1px solid #e0e0e0;
border-radius: 12px;
background-color: #f9f9f9;
color: #333;
box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.calc-header {
text-align: center;
margin-bottom: 25px;
}
.calc-header h2 {
color: #0056b3;
margin-bottom: 10px;
}
.input-group {
margin-bottom: 20px;
}
.input-group label {
display: block;
font-weight: 600;
margin-bottom: 8px;
color: #444;
}
.input-group input, .input-group select {
width: 100%;
padding: 12px;
border: 1px solid #ccc;
border-radius: 6px;
box-sizing: border-box;
font-size: 16px;
}
.calc-btn {
width: 100%;
padding: 15px;
background-color: #0056b3;
color: white;
border: none;
border-radius: 6px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s;
}
.calc-btn:hover {
background-color: #004494;
}
.results-section {
margin-top: 25px;
padding: 20px;
background-color: #fff;
border-radius: 8px;
border: 1px solid #d1d1d1;
display: none;
}
.result-item {
display: flex;
justify-content: space-between;
padding: 10px 0;
border-bottom: 1px solid #eee;
}
.result-item:last-child {
border-bottom: none;
}
.result-label {
font-weight: 600;
color: #555;
}
.result-value {
font-weight: 700;
color: #0056b3;
}
.info-content {
margin-top: 40px;
line-height: 1.6;
color: #444;
}
.info-content h3 {
color: #0056b3;
border-bottom: 2px solid #0056b3;
padding-bottom: 5px;
margin-top: 25px;
}
.info-content table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
}
.info-content table th, .info-content table td {
border: 1px solid #ddd;
padding: 10px;
text-align: left;
}
.info-content table th {
background-color: #f2f2f2;
}
Measurement System
Imperial (Inches / Feet per second)
Metric (Millimeters / Meters per second)
Pipe Inner Diameter (Inches)
Flow Velocity (Feet per second)
Calculate Flow Rate
Cubic Feet per Second (ft³/s):
–
Gallons Per Minute (GPM):
–
Cubic Meters per Hour (m³/h):
–
Liters Per Minute (L/min):
–
Understanding Pipe Discharge Flow Rate
The pipe discharge flow rate is a critical calculation for hydraulic engineers, plumbers, and irrigation specialists. It determines how much fluid (usually water) is moving through a pipe in a given timeframe. This calculation is governed by the continuity equation, which relates the cross-sectional area of the pipe to the velocity of the fluid.
The Flow Rate Formula
The basic formula used in this calculator is:
Q = A × v
Q: Flow rate (Discharge)
A: Cross-sectional area of the pipe (π × r²)
v: Average velocity of the fluid
Typical Velocity Ranges
When designing systems, engineers often aim for specific velocity ranges to prevent erosion or sediment buildup:
Application
Recommended Velocity (ft/s)
Recommended Velocity (m/s)
Water Supply Lines
3 – 7 ft/s
0.9 – 2.1 m/s
Gravity Sewer Lines
2 – 10 ft/s
0.6 – 3.0 m/s
Suction Lines (Pumps)
2 – 4 ft/s
0.6 – 1.2 m/s
Example Calculation
If you have a 6-inch (inner diameter) pipe and the water is moving at 4 feet per second:
Convert diameter to feet: 6 inches / 12 = 0.5 feet.
Calculate Radius: 0.5 / 2 = 0.25 feet.
Calculate Area: π × (0.25)² ≈ 0.1963 sq ft.
Calculate Flow Rate (CFS): 0.1963 × 4 = 0.7852 ft³/s.
Convert to GPM: 0.7852 × 448.83 ≈ 352.4 GPM.
function updateLabels() {
var system = document.getElementById("unitSystem").value;
var labelD = document.getElementById("labelDiameter");
var labelV = document.getElementById("labelVelocity");
if (system === "imperial") {
labelD.innerText = "Pipe Inner Diameter (Inches)";
labelV.innerText = "Flow Velocity (Feet per second)";
} else {
labelD.innerText = "Pipe Inner Diameter (Millimeters)";
labelV.innerText = "Flow Velocity (Meters per second)";
}
}
function calculateFlow() {
var system = document.getElementById("unitSystem").value;
var dInput = parseFloat(document.getElementById("diameter").value);
var vInput = parseFloat(document.getElementById("velocity").value);
var resultsDiv = document.getElementById("results");
if (isNaN(dInput) || dInput <= 0 || isNaN(vInput) || vInput <= 0) {
alert("Please enter valid positive numbers for diameter and velocity.");
return;
}
var area, q_cfs, q_gpm, q_cmh, q_lpm;
if (system === "imperial") {
// d in inches, v in ft/s
var radiusFeet = (dInput / 12) / 2;
area = Math.PI * Math.pow(radiusFeet, 2); // sq ft
q_cfs = area * vInput; // cubic feet per sec
q_gpm = q_cfs * 448.831;
q_cmh = q_cfs * 101.941;
q_lpm = q_gpm * 3.78541;
} else {
// d in mm, v in m/s
var radiusMeters = (dInput / 1000) / 2;
area = Math.PI * Math.pow(radiusMeters, 2); // sq meters
var q_cms = area * vInput; // cubic meters per sec
q_cmh = q_cms * 3600;
q_lpm = q_cms * 60000;
q_cfs = q_cms * 35.3147;
q_gpm = q_lpm / 3.78541;
}
document.getElementById("resCFS").innerText = q_cfs.toLocaleString(undefined, {minimumFractionDigits: 3, maximumFractionDigits: 3});
document.getElementById("resGPM").innerText = q_gpm.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("resCMH").innerText = q_cmh.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
document.getElementById("resLPM").innerText = q_lpm.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2});
resultsDiv.style.display = "block";
}