Cube Density Calculator

What material is your cube made of? Calculate density in seconds.

Enter the side length and mass of your cube to calculate its density. The result tells you whether the material will float, sink, or match a known substance — useful for material identification, lab work, and quick engineering checks.

Updated June 2026 · How this works

Example calculation — edit any field to use your own numbers

Worth knowing
How It Works
The formula, explained simply

Drop a cube into a glass of water and you immediately learn something: it either floats or sinks. That single observation tells you whether its density is above or below 1.0 g/cm3 — but it does not tell you how far above or below, or what the material actually is. Measuring and calculating density precisely gives you the number you need to match against a reference table and identify the substance.

The calculation works by finding the volume first. A cube's volume is its side length multiplied by itself three times. A 5 cm cube holds exactly 125 cm3 of space. Divide the measured mass by that volume and you have density in grams per cubic centimeter. The same relationship applies at any scale — a 1-meter concrete cube and a 1-centimeter concrete cube should produce the same density if the material is uniform.

Density is a material property, not a size property. A small piece of iron and a large iron beam have identical densities. This is what makes density so useful for identification: once you know the density of an unknown solid, you can compare it against published values for hundreds of materials and narrow down what it is made of, without any chemical testing.

When To Use This
Right tool, right situation

Use this calculator when you have a cube-shaped solid object and need to identify what it is made of, verify that a material matches specifications, or confirm whether it will float. Lab students, machinists receiving raw material stock, and quality control checks on cast metal parts are all appropriate uses. Hobbyist rock and mineral identification also works well here — cut a sample to a cube and weigh it.

Do not use this calculator when the object is not a cube. Spheres, cylinders, and irregular solids require different volume formulas. Using the cube formula on a non-cube shape will produce a volume error that makes the resulting density meaningless. If you have a rectangular block that is not a perfect cube, use a rectangular prism volume calculator instead.

Also avoid relying on this result alone for materials that may be hollow, coated, or composite. A titanium-coated aluminum cube will calculate as a density between the two materials — misleading for anyone trying to confirm pure titanium stock. In high-stakes situations such as precious metal verification, density is a screening step, not a definitive test.

Common Mistakes
Why results sometimes look wrong

The most common mistake is mixing units between mass and length inputs. Using centimeters for side length but kilograms for mass produces a result in kg/cm3 — a unit so large it immediately signals something went wrong. A 1 cm aluminum cube weighing 2.7 g has a density of 2.7 g/cm3, not 0.0027 kg/cm3. Always confirm units match before trusting the output.

A second mistake is assuming a sample is perfectly cubic when it is not. A block that is 4 cm x 4 cm x 4.1 cm is not a cube — its volume is 65.6 cm3, not 64 cm3. Using the slightly-off dimension as if it were a perfect cube introduces a 2.5% error in volume, which carries directly into the density result. Measure all three dimensions separately and average them if in doubt, or use a different calculator for rectangular prisms.

A third mistake is ignoring surface coatings. A hollow chocolate figurine with a thin lead shell will have a calculated density that falls somewhere between chocolate and lead — not a match for either. Density is a whole-object property. If the object has voids, coatings, or composite layers, the result describes the effective density of the whole piece, not the density of any single material in it.

The Math
Worked examples and deeper derivation

The core formula is: density (rho) = mass (m) divided by volume (V). For a cube with side length s, volume is s cubed, so: rho = m / s^3.

Unit consistency is where most errors happen. If you measure side length in centimeters and mass in grams, density comes out in g/cm3, which is the most common unit for material identification. Switch to meters and kilograms and you get kg/m3 — numerically 1,000 times larger for the same material. Gold is 19.3 g/cm3, which equals 19,300 kg/m3. Both are correct; they just use different scales.

To convert between common density units: multiply g/cm3 by 1,000 to get kg/m3. Multiply g/cm3 by 62.428 to get lb/ft3. Multiply g/cm3 by 0.03613 to get lb/in3. This calculator handles these conversions internally, so you can select whichever output unit your reference table uses.

Identifying an unknown metal block in a workshop
Side length: 3 cm, Mass: 242.1 g, Units: cm and grams, output in g/cm3
Volume is 27 cm3, density is 8.97 g/cm3. The closest known material is copper at 8.96 g/cm3 — a near-perfect match. This tells the machinist the block is almost certainly copper, not a similar-looking bronze alloy, which typically runs closer to 8.5 g/cm3.
Checking a suspect gold bar for purity
Side length: 5 cm, Mass: 2,100 g, Units: cm and grams, output in g/cm3
Volume is 125 cm3, density is 16.8 g/cm3. Pure gold is 19.3 g/cm3 — this result falls well below that, matching lead-filled or tungsten-core counterfeits more closely than solid gold. The density check in under a minute flags the bar for further testing without destructive analysis.
A schoolteacher verifying a 3D-printed cube assignment
Side length: 50 mm, Mass: 62.5 g, Units: millimeters and grams, output in g/cm3
Volume is 125,000 mm3 (125 cm3), density is 0.5 g/cm3. This matches balsa wood closely and falls well below water's 1.0 g/cm3 — confirming the cube will float. The teacher can use the float result as an instant classroom demonstration of Archimedes without any additional equipment.
Expert Unlock
The thing most explanations skip

The formula assumes the object is perfectly homogeneous — every cubic centimeter of it has exactly the same composition. Real-world materials are not always homogeneous: cast metals can have porosity, wood has grain variation, and plastics often contain fillers or air bubbles distributed unevenly. When your calculated density is consistently 2-5% lower than the published value for a known material, the gap often points to internal porosity rather than measurement error. This is why sintered metal parts, foamed polymers, and porous ceramics always measure below their solid-phase density — the formula captures bulk density accurately, but bulk density and true material density are not the same thing at the micro-scale.

Why does my density not match the reference table for that material?

What is the formula for density of a cube?
Density equals mass divided by volume. For a cube, volume is side length cubed, so the formula is: density = mass divided by (side length to the power of 3). If your side is 4 cm and mass is 100 g, volume is 64 cm3 and density is 1.5625 g/cm3. The cube shape makes volume calculation simpler than irregular objects — no water displacement needed.
How do I convert density from g/cm3 to kg/m3?
Multiply g/cm3 by 1,000 to get kg/m3. A material with a density of 2.7 g/cm3 (aluminum) equals 2,700 kg/m3. This conversion holds exactly because 1 g/cm3 = 1,000 kg/m3 by definition — the two units differ by a factor of 1,000 with no rounding involved.
How do I know if my cube will float in water?
Any material with a density below 1.0 g/cm3 floats in water. Objects denser than 1.0 g/cm3 sink. Ice at 0.917 g/cm3 floats — that is why icebergs appear above the surface. This calculator shows the float result automatically once density is calculated, so you do not need to do a second comparison step.

Need something this doesn't cover?

Suggest a tool — we'll build it →