Cube Calculator
A cube with edge length a has a volume of V = a³ and a surface area of S = 6a². A cube with 3-foot edges holds 27 cubic feet (one cubic yard, about 202 US gallons) and has 54 square feet of surface.
Enter any one measurement (edge, volume, surface area, face diagonal or space diagonal) and the calculator finds all the others. It can also cube a single number, such as 12³ = 1,728.

How to use the Cube Calculator
- Leave Cube (shape) selected to work with a solid cube, or choose Cube of a number (x³) to raise a number to the third power.
- In I know the, pick the measurement you have: edge length, volume, surface area, face diagonal or space diagonal.
- Type it into Value and choose the Length unit (inches, feet, yards, centimeters, meters or millimeters). A volume is read in cubic units and a surface area in square units of that length unit, as shown next to the box.
- Keep Also show the volume in US gallons and liters checked if you want a capacity estimate.
- Press Calculate to get every other measurement, with the steps.
Cube formulas
A cube has 6 identical square faces, 12 equal edges and 8 corners. Everything about it follows from the edge length a:
| Symbol | Meaning | Unit |
|---|---|---|
| a | Edge (side) length | in, ft, cm … |
| V | Volume, the space inside | in³, ft³, cm³ … |
| S | Total surface area of all six faces | in², ft², cm² … |
| d | Diagonal across one face, corner to corner | same as a |
| D | Space diagonal, from one corner through the center to the opposite corner | same as a |
Both diagonals come from the Pythagorean theorem. Across a face, d² = a² + a² = 2a². The space diagonal is the hypotenuse of a right triangle with legs d and a, so D² = 2a² + a² = 3a².

Example: a 3-foot cube (one cubic yard)
A storage bin, planter or water tank shaped like a cube has 3-foot edges.
| Measurement | Calculation | Result |
|---|---|---|
| Volume | 3³ | 27 ft³ |
| Surface area | 6 × 3² | 54 ft² |
| One face | 3² | 9 ft² |
| Face diagonal | 3 × √2 | 4.2426 ft |
| Space diagonal | 3 × √3 | 5.1962 ft |
| All 12 edges | 12 × 3 | 36 ft |
| US gallons | 27 × 1,728 in³ ÷ 231 in³ | 201.97 gal |
| Liters | 46,656 in³ × 0.016387064 L | 764.55 L |
Because 3 feet equals 1 yard, this cube is exactly one cubic yard: 1 yd³ = 27 ft³ = 46,656 in³. As a watertight tank with these inside dimensions it would hold about 202 US gallons.

Working backward: will it fit?
The space diagonal is the longest straight line that fits inside a cube. To check whether a 40-inch rod fits in a box with 24-inch inside edges, choose Edge length, enter 24 with the unit set to inches, and read the space diagonal: 24 × √3 ≈ 41.57 in. The rod fits, corner to corner. Going the other way, if a cube must hold 1,000 in³, choose Volume: the edge is ∛1,000 = 10 in.
Cube of a number (x³)
"Cubing" a number means multiplying it by itself three times: x³ = x × x × x. That is also the volume of a cube whose edge is x. A negative number cubed stays negative, because (−2) × (−2) × (−2) = −8, and a decimal works the same way: 1.5³ = 3.375.
| x | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| x³ | 1 | 8 | 27 | 64 | 125 | 216 | 343 | 512 | 729 | 1,000 | 1,728 |
The result also lists the square and the cube root, so you can go back and forth: ∛1,728 = 12.
How to read the result
- Lengths (edge, diagonals, total edge length) are in the unit you chose; areas are squared units; volume is cubic units.
- Scaling matters: doubling the edge multiplies the surface area by 4 and the volume by 8.
- Gallons are US liquid gallons (231 cubic inches each). A liter is 1,000 cm³.
- The inscribed sphere (radius a ÷ 2) is the largest ball that fits inside; the circumscribed sphere (radius a√3 ÷ 2) passes through all eight corners.
Assumptions and limitations
- The shape is a perfect cube: all edges equal and all angles 90°. For a box with different length, width and height, the cube formulas don't apply.
- Containers have wall thickness. Use inside dimensions for capacity and outside dimensions for space taken up or material needed.
- Gallon and liter figures describe geometric volume, not a safe fill level.
- Results are rounded for display, normally to four decimal places.
Common mistakes
- Converting cubic units with a linear factor. One foot is 12 inches, but one cubic foot is 12³ = 1,728 cubic inches, and one square foot is 144 square inches.
- Mixing units. Measure every edge in the same unit before entering it, or the volume will be off by a large factor.
- Confusing one face with the whole surface. A 3-foot cube has 9 ft² per face but 54 ft² in total.
- Using the face diagonal when you need the space diagonal. The diagonal across a face (4.24 ft for a 3-foot cube) is shorter than the diagonal through the center (5.20 ft).
Need the area of a curved slice instead? Try the Area of a Sector Calculator. Planning a masonry project? The Brick Calculator estimates how many bricks a wall needs.
Frequently asked questions
How do you find the volume of a cube?
Multiply the edge length by itself three times: V = a³. A cube with 3-foot edges has a volume of 3 × 3 × 3 = 27 cubic feet.
How do you find the side length of a cube from its volume?
Take the cube root of the volume: a = ∛V. A cube that holds 1,000 cubic inches has 10-inch edges, because 10³ = 1,000.
What is the surface area of a cube?
Six times the area of one face: S = 6a². A 3-foot cube has 9 ft² per face and 54 ft² in total.
How long is the diagonal of a cube?
The diagonal across one face is a√2 (about 1.414 × a). The space diagonal through the center, corner to corner, is a√3 (about 1.732 × a). For a 3-foot cube those are 4.24 ft and 5.20 ft.
How many gallons are in a cubic foot?
One cubic foot is 1,728 cubic inches and one US gallon is 231 cubic inches, so a cubic foot holds 1,728 ÷ 231 ≈ 7.48 US gallons (about 28.32 liters).
Sources and references
- Cube — Wolfram MathWorld
- Handbook 44 (2024), Appendix C: General Tables of Units of Measurement — National Institute of Standards and Technology (NIST)
- NIST Guide to the SI, Appendix B.8: Factors for Units Listed Alphabetically — National Institute of Standards and Technology (NIST)
Formulas and content last reviewed on October 13, 2026. Last updated October 13, 2026. Results are estimates for general information only. Spotted a problem? Tell us and we will check it.