ThisCalculator

Everyday

Volume of a Square Based Prism: Formula & Calculator

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 calculator finds the volume of a square-based prism (also called a square prism or a rectangular prism with a square base) when you enter the side length of the square base and the height of the prism. It returns the volume in cubic units, using the standard formula V = a² × h.

Formula

The volume of any prism is the area of its base multiplied by its height. For a square-based prism, the base is a square with side length a, so the base area is a². Therefore:

V = a² × h

  • V = volume (cubic units, e.g., m³, cm³, ft³)
  • a = side length of the square base (linear units, e.g., m, cm, ft)
  • h = height of the prism (same linear unit as a)

This works for any square prism, including a cube (where h = a) and a rectangular box that happens to have a square base.

Worked Example

Using the default values from the calculator: base side length a = 4 m, height h = 10 m.

  1. Calculate the base area: a² = 4² = 16 m²
  2. Multiply by the height: 16 m² × 10 m = 160 m³

The volume is 160 cubic meters. The calculator shows 160.00 m³, matching this result.

When to Use This Formula

Use this formula whenever you need the space inside a three-dimensional shape whose base is a square and whose sides are perpendicular to the base. Common real-world examples include:

  • Concrete footings or piers with a square cross-section
  • Square-based shipping boxes or storage containers
  • Swimming pools with a square footprint and uniform depth
  • Aquarium tanks that are square on the bottom
  • Excavation for a square hole or foundation

The formula also applies to a cube, where height equals base side length, giving V = a³.

How to Read the Result

The volume is expressed in cubic units. If you input side length and height in meters, the volume is in cubic meters (m³). If you use centimeters, you get cubic centimeters (cm³), and so on. One cubic meter equals 1,000 liters, which is handy for water or liquid capacity. For example, a prism with a 4 m base and 10 m height holds 160 m³ of water, which is 160,000 liters.

In US customary units, if you input feet, the volume is in cubic feet. There are 7.48052 gallons in one cubic foot, so you can convert to gallons by multiplying. For instance, a prism with a 4 ft base and 10 ft height has a volume of 160 ft³, which is about 1,196.88 US gallons.

Common Mistakes and Pitfalls

One of the most frequent errors is mixing units. If the base side is measured in meters and the height in centimeters, the volume will be off by a factor of 100 (or 1,000,000 in cubic terms). Always convert all dimensions to the same unit before calculating.

Another mistake is confusing the base side length with the base diagonal or the perimeter. The formula needs the side length of the square, not its diagonal. If you only know the diagonal d, you can find the side length using a = d / √2, then apply the volume formula.

Rounding too early can also cause errors. Keep several decimal places during intermediate steps and round only the final answer. The calculator rounds to two decimal places, which is usually sufficient for practical purposes.

Limitations of the Formula

This formula assumes a right prism, meaning the sides are perpendicular to the base. If the prism is slanted (an oblique prism), the volume is still base area times height, but the height must be measured perpendicular to the base, not along the slanted edge. For a square-based prism that is not right, you need the perpendicular height.

The formula also assumes the base is a perfect square. If the base is a rectangle with different side lengths, use the rectangular prism formula V = length × width × height instead.

Frequently Asked Questions

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

A square prism has a square base, so both base dimensions are equal. A rectangular prism has a rectangular base, which may have different length and width. The volume formula for a rectangular prism is V = l × w × h, which simplifies to V = a² × h when l = w = a.

How do I find the volume if I only know the surface area?

You need more than just the surface area to determine the volume uniquely. For a square prism, surface area S = 2a² + 4ah. With one equation and two unknowns (a and h), there are infinitely many possible volumes. You would need an additional piece of information, such as the height or the base side length.

Does the formula work for a cube?

Yes. A cube is a special square prism where the height equals the base side length. So V = a² × a = a³. For example, a cube with side 4 m has volume 64 m³.

How do I convert cubic feet to gallons?

One cubic foot equals approximately 7.48052 US gallons. Multiply the volume in cubic feet by 7.48052 to get gallons. For imperial gallons, the conversion factor is about 6.22884.

What if my prism is not a right prism?

For an oblique prism (slanted), the volume is still the base area times the perpendicular height. Measure the height straight down from the top base to the bottom base, not along the slanted edge. The formula V = a² × h still holds.

Can I use this calculator for a swimming pool with a square top but sloped bottom?

No. The formula assumes a uniform height. If the bottom is sloped, the shape is not a prism. You would need to calculate the volume using integration or approximate it with average depth. For a pool with a constant depth, this calculator works perfectly.

Related

Formula used
in a | Side length of base | m | 4 | 0
in h | Height | m | 10 | 0
out V | Volume | m³ | a^2 * h | 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.