How the calculation works
Divide pixels by PPI to calculate inches. Multiply inches by 2.54 for centimeters. In reverse, required fractional pixel counts are rounded upward after removing only machine-scale floating-point noise.
Worked example
A 3000 by 2000 pixel image at 300 PPI calculates to 10 by 6.6667 inches, or 25.4 by 16.9333 centimeters.
Limits
This estimates geometric dimensions and does not guarantee print quality. Paper, printer, editing, and viewing distance also matter. PPI describes image pixels; printer DPI is different.