When you print something you want to print at least with 300 DPI. Better 600 DPI.
That's how many pixels are actually put in a square inch
So if you want to print 3x3 in with 300 DPI you need a 900x900px photo
And if you want to print at 600 DPI you need a 1800x1800px photo
But this all depends on what the print size should be (in that case 3x3 inch)