How many unit cubes are visible?

A 10×10×10 cube contains 1000 unit cubes. Count the outside shell by subtracting the completely hidden inner core.

Whole cube − hidden core
A cube is hidden only if it touches no outside face.
8 × 8 × 8 hidden core 10 cubes across 10 high 10 deep
All unit cubes
10³ = 1000
Completely hidden cubes
8³ = 512
Removing the outside layer from both sides of each dimension leaves 10 − 2 = 8.
Visible on the outside
488
1000 − 512 = 488
Why this works
10³ − (10−2)³ = 1000 − 512 = 488
1. Start with all 1000 unit cubes.
2. The only invisible cubes are completely inside the large cube.
3. Removing one outer layer from every side leaves an 8×8×8 inner cube.
4. Hidden cubes = 512, so visible cubes = 1000 − 512 = 488.
Interview shortcut: For an n×n×n cube, the number of visible unit cubes is n³ − (n−2)³.