Converting pixels to centimetres

Wondering if there is a way or a formula for converting pixels to centimetres. Im doin a Pythagoras’s theorem widget flash thing.