how to calculate cuboid - Search