How to convert pixels to inches
Divide the pixel count by the DPI (dots per inch). A 3,000-pixel-wide image printed at 300 DPI is 3,000 ÷ 300 = 10 inches wide. For centimeters, multiply the inches by 2.54.
Going the other way, multiply inches by DPI: an 8 × 10 inch print at 300 DPI needs 2,400 × 3,000 pixels.