The formula
One inch is exactly 2.54 cm and one foot is 12 inches. Divide centimetres by 2.54 for total inches, then split into feet and the remaining inches. To go back, multiply total inches by 2.54.
Avoid rounding errors
Round only at the end. Rounding inches before splitting can make a 170 cm person read as 5′ 6″ instead of the correct 5′ 6.9″.