Calculate the density of a cube from its mass and side length, or solve for mass or side length when the other values are known. Density equals mass divided by volume, and for a cube the volume is the side length cubed.
Density is a measure of how much mass is packed into a given volume. For any object the formula is:
For a cube, all three dimensions are equal, so the volume is simply the side length multiplied by itself three times:
Combining these gives the complete formula for the density of a cube:
For example, a cube with a side length of 5 cm and a mass of 337.5 g has a volume of 5 × 5 × 5 = 125 cm³ and a density of 337.5 / 125 = 2.7 g/cm³. This is the density of aluminium, so the cube is made of aluminium.
The same formula can be rearranged to find mass or side length:
This calculator handles all three arrangements. Select what you want to solve for in the first section.
| Unit | Common use | Equivalent |
|---|---|---|
| g/cm³ (grams per cubic centimetre) | Small objects, materials science | Same as g/mL |
| kg/m³ (kilograms per cubic metre) | Engineering, SI standard | 1 g/cm³ = 1000 kg/m³ |
| kg/L (kilograms per litre) | Liquids, food science | Same as g/cm³ |
Water has a density of exactly 1 g/cm³ at 4 degrees Celsius, which makes it a convenient reference. Any material with a density greater than 1 g/cm³ will sink in water; anything below 1 g/cm³ will float.
A solid metal cube has a side length of 5 cm and a mass of 337.5 g. What is its density?
This matches the default output of the calculator above.
Method: Standard density formula (density = mass / volume) with cube volume = s³. Side length from density and mass uses the cube root: s = (mass / density)⅓. All arithmetic is performed in the selected unit system with no rounding until display.
This calculator assumes a perfect cube where all sides are equal. For rectangular objects with different length, width, and height, use the Rectangular Box Calculator. Results are for a uniform, solid cube with no hollow sections.
If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.
Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.
Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.
All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.
Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.
Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.
Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.
All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.
About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use
Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.
© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.