ThisCalculator

Everyday

Square Tank Volume Calculator: How to Find Gallons or Liters

Updated · Standard formula, shown below

The calculator for this page is switched off while it is checked. The formula is below, and the worked example in the article shows how to use it by hand.

This square tank volume calculator works out the capacity of a rectangular or square tank in gallons, liters, and cubic units. You enter the tank’s length, width, and height (in inches, feet, centimeters, or meters), and the calculator returns the total volume in your chosen unit. It uses the standard formula for a rectangular prism: volume = length × width × height.

Formula

The volume of a square or rectangular tank is the product of its three internal dimensions:

V = L × W × H

Where:

  • V = volume (cubic inches, cubic feet, cubic centimeters, or cubic meters)
  • L = internal length of the tank
  • W = internal width of the tank
  • H = internal height of the tank (water depth, not necessarily the full tank height)

To convert cubic inches to US gallons, divide by 231 (since 1 US gallon = 231 cubic inches). To convert cubic inches to liters, multiply by 0.0163871 (since 1 cubic inch = 16.3871 mL). If you measure in feet, multiply the three dimensions to get cubic feet, then multiply by 7.48052 for US gallons, or by 28.3168 for liters.

Worked Example

Using the default values from the calculator: length = 24 in, width = 12 in, height = 12 in.

  1. Compute the volume in cubic inches: 24 × 12 × 12 = 3,456 in³
  2. Convert to US gallons: 3,456 ÷ 231 = 14.96 gallons
  3. Convert to liters: 3,456 × 0.0163871 = 56.63 liters
  4. Convert to cubic feet: 3,456 ÷ 1,728 = 2.00 ft³

The calculator shows 14.96 gallons, 56.63 liters, and 2.00 cubic feet—exactly matching these steps.

Why Use Internal Dimensions?

A common mistake is measuring the outside of the tank. The walls, bottom, and any internal fittings (like baffles or overflow boxes) reduce the actual water-holding capacity. For accurate volume, measure the inside from wall to wall. If you only have outside measurements, subtract twice the wall thickness from the length and width, and subtract the bottom thickness from the height. For a typical glass aquarium, wall thickness is usually 0.25 to 0.5 inches (6–12 mm), but check the manufacturer’s specs.

When to Use This Calculator

This calculator is useful for:

  • Aquariums: Determining how many gallons of water a fish tank holds, which is essential for stocking levels and medication dosing.
  • Hydroponics and gardening: Calculating the volume of a grow bed or reservoir to mix nutrients correctly.
  • Water storage: Estimating the capacity of a square or rectangular rain barrel or cistern.
  • Aquaponics: Sizing sump tanks and fish tanks to balance the system.
  • Industrial or DIY projects: Any rectangular container where you need to know its capacity in gallons or liters.

Common Mistakes and How to Avoid Them

  • Mixing units: If you measure length in feet and width in inches, the volume will be off by a factor of 12. Convert all dimensions to the same unit before multiplying.
  • Using outside dimensions: As noted, this overestimates volume. Always use internal dimensions for water capacity.
  • Forgetting that height is water depth: If you don’t fill the tank to the brim, use the actual water depth, not the full tank height. For example, a 24×12×12 tank filled to 10 inches holds 24×12×10 = 2,880 in³ ÷ 231 = 12.47 gallons, not 14.96.
  • Confusing US and imperial gallons: The US gallon is 231 in³, while the imperial (UK) gallon is 277.42 in³. This calculator uses US gallons. If you need imperial gallons, multiply the US result by 0.8327.
  • Rounding too early: If you round the cubic inches to a whole number before converting, you’ll get a slightly different answer. Keep full precision until the final step.

Limitations of the Formula

The formula V = L × W × H assumes a perfectly rectangular tank with straight sides and a flat bottom. It does not account for:

  • Sloped or rounded bottoms: Many plastic storage containers have sloped or rounded corners, which reduce actual volume.
  • Internal equipment: Submersible pumps, heaters, and decorations displace water, so the actual water volume is slightly less than the calculated volume.
  • Meniscus and surface tension: When filled to the very top, the water surface curves slightly, but this effect is negligible for most practical purposes.
  • Water expansion with temperature: Water expands when heated, so a tank filled to the brim at 20°C might overflow at 30°C. Leave a small air gap.

Frequently Asked Questions

How do I calculate the volume of a square tank in liters?

Measure the length, width, and height in centimeters, multiply them to get cubic centimeters, then divide by 1000 to get liters. For example, a 60 cm × 30 cm × 30 cm tank holds 60 × 30 × 30 = 54,000 cm³ = 54 liters. If your measurements are in inches, multiply the cubic inches by 0.0163871 to get liters.

What is the difference between a square tank and a rectangular tank?

Strictly, a square tank has equal length and width (e.g., 12×12×12 inches), while a rectangular tank has different length and width (e.g., 24×12×12). The volume formula is the same for both: length × width × height. A square tank is just a special case where L = W.

How many gallons does a 24x12x12 tank hold?

A 24×12×12 inch tank (measured internally) holds 24 × 12 × 12 = 3,456 cubic inches. Dividing by 231 gives 14.96 US gallons. This is a common standard aquarium size, often sold as a “15-gallon” tank, but the actual water capacity is slightly less when filled to the brim due to glass thickness.

Can I use this calculator for a cylindrical tank?

No, this calculator is only for square or rectangular tanks. For a cylinder, use the formula V = π × r² × h, where r is the radius and h is the height. You would need a different calculator that accepts radius and height inputs.

What if my tank has a sloped bottom?

If the bottom is not flat, the simple L × W × H formula overestimates the volume. A more accurate approach is to calculate the volume of the sloped section separately (e.g., as a triangular prism) and add it to the rectangular portion. For most hobby tanks, the bottom is flat, so the formula works well.

Should I measure the outside or inside of the tank?

Always measure the inside for water capacity. Outside dimensions include the glass or plastic thickness, which reduces the actual volume. For a glass aquarium, the difference can be 5–10% depending on the glass thickness. If you only have outside measurements, subtract twice the wall thickness from length and width, and subtract the bottom thickness from height.

Related

Formula used
in l | Length | in | 24 | 0
in w | Width | in | 12 | 0
in h | Height | in | 12 | 0
out gal | Volume (US gallons) | gal | (l * w * h) / 231 | 2
out l | Volume (liters) | L | (l * w * h) * 0.0163871 | 2
out ft3 | Volume (cubic feet) | ft³ | (l * w * h) / 1728 | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.