Often i run in to issues calculating how many pixels are 51x51 mm or 50x50 mm to resize photos for applying a government document like passport.

Here are few pre determined values

50x50mm - 300dpi = 591x591 pixels 51x51mm - 300dpi = 600x600 pixels

Here is the calculator to cross check the values.