A square image has 2400 pixels on each edge. The nominal edge is 8 inches, or 20.32 cm.

The worked example

Calculation
2400 / 300 = 8
8 * 2.54 = 20.32

These are constructed inputs. Displayed decimals are rounded; they are not product measurements.

Understand the result before using it

Pixels per inch connects digital dimensions to a physical length. At 200 ppi the same 2400 pixels span 12 inches, or 30.48 cm; at 300 ppi they span 8 inches. The file has not gained or lost pixels merely because the intended print density changed. Distinguish changing a resolution tag from resampling the image.

For a 15 cm print edge, reverse the calculation: 15 divided by 2.54, multiplied by 300, is about 1772 pixels. That makes the requested size explicit before selecting an export. Viewing distance, source focus and printing process still affect the result. A printer's dots-per-inch specification describes its marking process and is not interchangeable with image pixels per inch. Ask the print service for its requested image dimensions rather than treating a large printer DPI number as a required photo width.

If the frame and photo have different proportions, decide which edges to crop first. Use the dimensions left after that crop for your PPI calculation. If the export dialog also asks for a scale percentage, see how resizing changes the pixel count before confirming.

The boundary of this calculation

This is a size conversion, not a promise of sharpness or a printer test.

Inspect the example inputs and run the Python checks. They use only the published examples and do not read personal folders.