How many pixels do you need for printing digital photos

You take the pictures, and want to print it on your color printer or through Costco photo lab. But you don’t know the max size you can print.
Here is a handy printing guide for it.
5 MP = 2592 x 1944 pixels
High Quality: 10 x 13 inches
Acceptable Quality: 13 x 19 inches
4 MP = 2272 x 1704 pixels
High Quality: 9 x 12 inches
Acceptable Quality: 12 x 16 inches
3 MP = 2048 x 1536 pixels
High Quality: 8 x 10 inches
Acceptable Quality: 10 x 13 inches
2 MP = 1600 x 1200 pixels
High Quality: 4 x 6 inches, 5 x 7 inches
Acceptable Quality: 8 x 10 inches
The other way, you have a 4×6 picture, you want to scan it and enlarge it to 9×12.
The scanner has at least 450dpi scanning resolution.
The basic fact is the printout has about 200ppi, or 200lpi.
The formula is like this:
9/4 x 200 = 450dpi

Here is another sample.
You have a old picture, only 2×3. You want enlarge it to 20×24
When you use scanner to scan it, you have to at least use 2000dpi to scan it.
The the picture pixels are 4000×6000.
It will have a good quality when you print it at 20×24.