Calculate the volume of cylindrical, spherical, or rectangular tanks by entering dimensions. Get results in cubic meters, liters, gallons, or cubic feet.
Cylindrical Tank Volume Formula:
V = π × r² × h
The Tank Volume Calculator is a powerful tool designed to help you accurately determine the volume of various tank shapes, including cylindrical, spherical, and rectangular tanks. Whether you're a professional engineer working on industrial projects, a contractor planning water storage solutions, or a homeowner managing a rainwater collection system, knowing the precise volume of your tank is essential for proper planning, installation, and maintenance.
Tank volume calculations are fundamental in numerous industries, including water management, chemical processing, oil and gas, agriculture, and construction. By accurately calculating tank volumes, you can ensure proper fluid storage capacity, estimate material costs, plan for adequate space requirements, and optimize resource utilization.
This calculator provides a straightforward, user-friendly interface that allows you to quickly determine tank volumes by simply inputting the relevant dimensions based on your tank's shape. The results are displayed instantly, and you can easily convert between different volume units to suit your specific needs.
The volume of a tank depends on its geometric shape. Our calculator supports three common tank shapes, each with its own volume formula:
For cylindrical tanks, the volume is calculated using the formula:
Where:
The radius must be measured from the center point to the inner wall of the tank. For horizontal cylindrical tanks, the height would be the length of the cylinder.
For spherical tanks, the volume is calculated using the formula:
Where:
The radius is measured from the center point to the inner wall of the spherical tank.
For rectangular or square tanks, the volume is calculated using the formula:
Where:
All measurements should be taken from the inner walls of the tank for accurate volume calculation.
Our calculator supports various unit systems. Here are common conversion factors for volume:
Follow these simple steps to calculate your tank's volume:
Tank volume calculations are essential in numerous applications across various industries:
While our calculator provides a straightforward way to determine tank volumes for common shapes, there are alternative approaches for more complex situations:
3D Modeling Software: For irregular or complex tank shapes, CAD software can create detailed 3D models and calculate precise volumes.
Displacement Method: For existing tanks with irregular shapes, you can measure volume by filling the tank with water and measuring the amount used.
Numerical Integration: For tanks with variable cross-sections, numerical methods can integrate the changing area over the height of the tank.
Strapping Tables: These are calibration tables that relate the height of liquid in a tank to the volume, accounting for irregularities in tank shape.
Laser Scanning: Advanced laser scanning technology can create precise 3D models of existing tanks for volume calculation.
Ultrasonic or Radar Level Measurement: These technologies can be combined with tank geometry data to calculate volumes in real-time.
Weight-Based Calculation: For some applications, measuring the weight of the tank contents and converting to volume based on density is more practical.
Segmentation Method: Breaking down complex tanks into simpler geometric shapes and calculating the volume of each segment separately.
The calculation of tank volumes has a rich history that parallels the development of mathematics, engineering, and human civilization's need to store and manage liquids.
The earliest evidence of volume calculation dates back to ancient civilizations. The Egyptians, as early as 1800 BCE, developed formulas for calculating the volume of cylindrical granaries, as documented in the Moscow Mathematical Papyrus. The ancient Babylonians also developed mathematical techniques for calculating volumes, particularly for irrigation and water storage systems.
The ancient Greeks made significant advancements in geometry that directly impacted volume calculations. Archimedes (287-212 BCE) is credited with developing the formula for calculating the volume of a sphere, a breakthrough that remains fundamental to modern tank volume calculations. His work "On the Sphere and Cylinder" established the relationship between the volume of a sphere and its circumscribing cylinder.
During the medieval period, Islamic mathematicians preserved and expanded upon Greek knowledge. Scholars like Al-Khwarizmi and Omar Khayyam advanced algebraic methods that could be applied to volume calculations. The Renaissance period saw further refinements, with mathematicians like Luca Pacioli documenting practical applications of volume calculations for commerce and trade.
The Industrial Revolution (18th-19th centuries) brought unprecedented demand for precise tank volume calculations. As industries expanded, the need for storing water, chemicals, and fuels in large quantities became critical. Engineers developed more sophisticated methods for designing and measuring storage tanks, particularly for steam engines and chemical processes.
The 20th century saw the establishment of engineering standards for tank design and volume calculation. Organizations like the American Petroleum Institute (API) developed comprehensive standards for oil storage tanks, including detailed methods for volume calculation and calibration. The introduction of computers in the mid-20th century revolutionized complex volume calculations, allowing for more precise designs and analyses.
In recent decades, computer-aided design (CAD) software, computational fluid dynamics (CFD), and advanced measurement technologies have transformed tank volume calculations. Engineers can now model complex tank geometries, simulate fluid behaviors, and optimize designs with unprecedented precision. Modern tank volume calculators, like the one provided here, make these sophisticated calculations accessible to everyone, from engineers to homeowners.
The late 20th and early 21st centuries have seen increased focus on environmental protection and safety in tank design and operation. Volume calculations now incorporate considerations for containment, overflow prevention, and environmental impact. Regulations require precise volume knowledge for hazardous material storage, driving further refinement of calculation methods.
Today, tank volume calculation remains a fundamental skill in numerous industries, combining ancient mathematical principles with modern computational tools to meet the diverse needs of our technological society.
Here are examples of how to calculate tank volumes in various programming languages:
1' Excel VBA Function for Cylindrical Tank Volume
2Function CylindricalTankVolume(radius As Double, height As Double) As Double
3 CylindricalTankVolume = Application.WorksheetFunction.Pi() * radius ^ 2 * height
4End Function
5
6' Excel VBA Function for Spherical Tank Volume
7Function SphericalTankVolume(radius As Double) As Double
8 SphericalTankVolume = (4/3) * Application.WorksheetFunction.Pi() * radius ^ 3
9End Function
10
11' Excel VBA Function for Rectangular Tank Volume
12Function RectangularTankVolume(length As Double, width As Double, height As Double) As Double
13 RectangularTankVolume = length * width * height
14End Function
15
16' Usage examples:
17' =CylindricalTankVolume(2, 5)
18' =SphericalTankVolume(3)
19' =RectangularTankVolume(2, 3, 4)
20
1import math
2
3def cylindrical_tank_volume(radius, height):
4 """Calculate the volume of a cylindrical tank."""
5 return math.pi * radius**2 * height
6
7def spherical_tank_volume(radius):
8 """Calculate the volume of a spherical tank."""
9 return (4/3) * math.pi * radius**3
10
11def rectangular_tank_volume(length, width, height):
12 """Calculate the volume of a rectangular tank."""
13 return length * width * height
14
15# Example usage:
16radius = 2 # meters
17height = 5 # meters
18length = 2 # meters
19width = 3 # meters
20
21cylindrical_volume = cylindrical_tank_volume(radius, height)
22spherical_volume = spherical_tank_volume(radius)
23rectangular_volume = rectangular_tank_volume(length, width, height)
24
25print(f"Cylindrical tank volume: {cylindrical_volume:.2f} cubic meters")
26print(f"Spherical tank volume: {spherical_volume:.2f} cubic meters")
27print(f"Rectangular tank volume: {rectangular_volume:.2f} cubic meters")
28
1function cylindricalTankVolume(radius, height) {
2 return Math.PI * Math.pow(radius, 2) * height;
3}
4
5function sphericalTankVolume(radius) {
6 return (4/3) * Math.PI * Math.pow(radius, 3);
7}
8
9function rectangularTankVolume(length, width, height) {
10 return length * width * height;
11}
12
13// Convert volume to different units
14function convertVolume(volume, fromUnit, toUnit) {
15 const conversionFactors = {
16 'cubic-meters': 1,
17 'cubic-feet': 35.3147,
18 'liters': 1000,
19 'gallons': 264.172
20 };
21
22 // Convert to cubic meters first
23 const volumeInCubicMeters = volume / conversionFactors[fromUnit];
24
25 // Then convert to target unit
26 return volumeInCubicMeters * conversionFactors[toUnit];
27}
28
29// Example usage:
30const radius = 2; // meters
31const height = 5; // meters
32const length = 2; // meters
33const width = 3; // meters
34
35const cylindricalVolume = cylindricalTankVolume(radius, height);
36const sphericalVolume = sphericalTankVolume(radius);
37const rectangularVolume = rectangularTankVolume(length, width, height);
38
39console.log(`Cylindrical tank volume: ${cylindricalVolume.toFixed(2)} cubic meters`);
40console.log(`Spherical tank volume: ${sphericalVolume.toFixed(2)} cubic meters`);
41console.log(`Rectangular tank volume: ${rectangularVolume.toFixed(2)} cubic meters`);
42
43// Convert to gallons
44const cylindricalVolumeGallons = convertVolume(cylindricalVolume, 'cubic-meters', 'gallons');
45console.log(`Cylindrical tank volume: ${cylindricalVolumeGallons.toFixed(2)} gallons`);
46
1public class TankVolumeCalculator {
2 private static final double PI = Math.PI;
3
4 public static double cylindricalTankVolume(double radius, double height) {
5 return PI * Math.pow(radius, 2) * height;
6 }
7
8 public static double sphericalTankVolume(double radius) {
9 return (4.0/3.0) * PI * Math.pow(radius, 3);
10 }
11
12 public static double rectangularTankVolume(double length, double width, double height) {
13 return length * width * height;
14 }
15
16 // Convert volume between different units
17 public static double convertVolume(double volume, String fromUnit, String toUnit) {
18 // Conversion factors to cubic meters
19 double toCubicMeters;
20 switch (fromUnit) {
21 case "cubic-meters": toCubicMeters = 1.0; break;
22 case "cubic-feet": toCubicMeters = 0.0283168; break;
23 case "liters": toCubicMeters = 0.001; break;
24 case "gallons": toCubicMeters = 0.00378541; break;
25 default: throw new IllegalArgumentException("Unknown unit: " + fromUnit);
26 }
27
28 // Convert to cubic meters
29 double volumeInCubicMeters = volume * toCubicMeters;
30
31 // Convert from cubic meters to target unit
32 switch (toUnit) {
33 case "cubic-meters": return volumeInCubicMeters;
34 case "cubic-feet": return volumeInCubicMeters / 0.0283168;
35 case "liters": return volumeInCubicMeters / 0.001;
36 case "gallons": return volumeInCubicMeters / 0.00378541;
37 default: throw new IllegalArgumentException("Unknown unit: " + toUnit);
38 }
39 }
40
41 public static void main(String[] args) {
42 double radius = 2.0; // meters
43 double height = 5.0; // meters
44 double length = 2.0; // meters
45 double width = 3.0; // meters
46
47 double cylindricalVolume = cylindricalTankVolume(radius, height);
48 double sphericalVolume = sphericalTankVolume(radius);
49 double rectangularVolume = rectangularTankVolume(length, width, height);
50
51 System.out.printf("Cylindrical tank volume: %.2f cubic meters%n", cylindricalVolume);
52 System.out.printf("Spherical tank volume: %.2f cubic meters%n", sphericalVolume);
53 System.out.printf("Rectangular tank volume: %.2f cubic meters%n", rectangularVolume);
54
55 // Convert to gallons
56 double cylindricalVolumeGallons = convertVolume(cylindricalVolume, "cubic-meters", "gallons");
57 System.out.printf("Cylindrical tank volume: %.2f gallons%n", cylindricalVolumeGallons);
58 }
59}
60
1#include <iostream>
2#include <cmath>
3#include <iomanip>
4#include <string>
5#include <unordered_map>
6
7const double PI = 3.14159265358979323846;
8
9// Calculate volume of a cylindrical tank
10double cylindricalTankVolume(double radius, double height) {
11 return PI * std::pow(radius, 2) * height;
12}
13
14// Calculate volume of a spherical tank
15double sphericalTankVolume(double radius) {
16 return (4.0/3.0) * PI * std::pow(radius, 3);
17}
18
19// Calculate volume of a rectangular tank
20double rectangularTankVolume(double length, double width, double height) {
21 return length * width * height;
22}
23
24// Convert volume between different units
25double convertVolume(double volume, const std::string& fromUnit, const std::string& toUnit) {
26 std::unordered_map<std::string, double> conversionFactors = {
27 {"cubic-meters", 1.0},
28 {"cubic-feet", 0.0283168},
29 {"liters", 0.001},
30 {"gallons", 0.00378541}
31 };
32
33 // Convert to cubic meters
34 double volumeInCubicMeters = volume * conversionFactors[fromUnit];
35
36 // Convert from cubic meters to target unit
37 return volumeInCubicMeters / conversionFactors[toUnit];
38}
39
40int main() {
41 double radius = 2.0; // meters
42 double height = 5.0; // meters
43 double length = 2.0; // meters
44 double width = 3.0; // meters
45
46 double cylindricalVolume = cylindricalTankVolume(radius, height);
47 double sphericalVolume = sphericalTankVolume(radius);
48 double rectangularVolume = rectangularTankVolume(length, width, height);
49
50 std::cout << std::fixed << std::setprecision(2);
51 std::cout << "Cylindrical tank volume: " << cylindricalVolume << " cubic meters" << std::endl;
52 std::cout << "Spherical tank volume: " << sphericalVolume << " cubic meters" << std::endl;
53 std::cout << "Rectangular tank volume: " << rectangularVolume << " cubic meters" << std::endl;
54
55 // Convert to gallons
56 double cylindricalVolumeGallons = convertVolume(cylindricalVolume, "cubic-meters", "gallons");
57 std::cout << "Cylindrical tank volume: " << cylindricalVolumeGallons << " gallons" << std::endl;
58
59 return 0;
60}
61
A tank volume calculator is a tool that helps you determine the capacity of a tank based on its shape and dimensions. It uses mathematical formulas to calculate how much liquid or material a tank can hold, typically expressed in cubic units (like cubic meters or cubic feet) or liquid volume units (like liters or gallons).
Our calculator supports three common tank shapes:
The radius is half the diameter of the tank. Measure the diameter (the distance across the widest part of the tank passing through the center) and divide by 2 to get the radius. For example, if your tank has a diameter of 2 meters, the radius is 1 meter.
Our calculator supports multiple unit systems:
The calculator provides highly accurate results based on mathematical formulas for regular geometric shapes. The accuracy of your result depends primarily on the precision of your measurements and how closely your tank matches one of the standard shapes (cylindrical, spherical, or rectangular).
The current version of our calculator determines the total capacity of a tank. For partially filled tanks, you would need to use more complex calculations that account for the fluid level. This functionality may be added in future updates.
For a horizontal cylindrical tank, use the same cylindrical tank formula, but note that the "height" input should be the length of the cylinder (the horizontal dimension), and the radius should be measured from the center to the inner wall.
For irregularly shaped tanks, you may need to:
Our calculator includes built-in conversion options. Simply select your preferred output unit (cubic meters, cubic feet, liters, or gallons) from the dropdown menu, and the calculator will automatically convert the result.
Yes, this calculator is suitable for both personal and professional use. However, for critical industrial applications, very large tanks, or situations requiring regulatory compliance, we recommend consulting with a professional engineer to verify calculations.
American Petroleum Institute. (2018). Manual of Petroleum Measurement Standards Chapter 2—Tank Calibration. API Publishing Services.
Blevins, R. D. (2003). Applied Fluid Dynamics Handbook. Krieger Publishing Company.
Finnemore, E. J., & Franzini, J. B. (2002). Fluid Mechanics with Engineering Applications. McGraw-Hill.
International Organization for Standardization. (2002). ISO 7507-1:2003 Petroleum and liquid petroleum products — Calibration of vertical cylindrical tanks. ISO.
Munson, B. R., Young, D. F., & Okiishi, T. H. (2018). Fundamentals of Fluid Mechanics. Wiley.
National Institute of Standards and Technology. (2019). NIST Handbook 44 - Specifications, Tolerances, and Other Technical Requirements for Weighing and Measuring Devices. U.S. Department of Commerce.
White, F. M. (2015). Fluid Mechanics. McGraw-Hill Education.
Streeter, V. L., Wylie, E. B., & Bedford, K. W. (1998). Fluid Mechanics. McGraw-Hill.
American Water Works Association. (2017). Water Storage Facility Design and Construction. AWWA.
Hydraulic Institute. (2010). Engineering Data Book. Hydraulic Institute.
Meta Description Suggestion: Calculate the volume of cylindrical, spherical, and rectangular tanks with our easy-to-use Tank Volume Calculator. Get instant results in multiple units.
Call to Action: Try our Tank Volume Calculator now to accurately determine your tank's capacity. Share your results or explore our other engineering calculators to solve more complex problems.
Discover more tools that might be useful for your workflow