Megapixels have become the ultimate measure of a camera. If your cousin has a phone with more megapixels than your year-old point-and-shoot camera, clearly he must have the better, higher-quality device. Right?

Wrong.

Megapixels vs. pixel size

Like calories, megapixels are a measure of quantity, not quality. You need a certain number of megapixels depending on the way to want to share a photo. But just as the number of calories in a meal doesn't say much about how nutritious it is, the number of pixels in a camera doesn't say much about the quality of the image they can capture.

Quality is a complex issue based upon a camera’s optics, image sensor design, firmware, engineering, and yes, its pixels — but not its megapixel count. At the heart of your camera is the image sensor, which contains the array of pixels. These pixels are like buckets that collect photons (i.e., light).

MORE: Camera Buying Guide

Image sensors come in different sizes. The larger the image sensor, the larger the pixels can be, and the more photons each can collect. The result is a picture that is cleaner, with less image noise (graininess), and typically a finer differentiation and delineation of highlights and shadows.

To get a rough idea of any camera’s sensor size, look at the diameter of the lens. An 8-megapixel smartphone camera packs 8 million pixels onto a minuscule sensor about the size of a baby aspirin tablet. However, an 8-megapixel compact camera has a significantly larger sensor, about the size of a pinky fingernail, so each individual bucket (pixel) is bigger and deeper. That allows it to capture more light without the light spilling over to adjacent pixels — which is a prime cause of noise (a grainy appearance) and ghosting (a double image).

However, this is changing. With newer smartphones, such as the iPhone 7 and Samsung Galaxy S7 Edge, the size of the individual pixels has increased (to 1.22 microns for the iPhone and 1.4 microns for the Samsung), making them about the same size as those in many point-and-shoot cameras. (Here's our roundup of the best smartphone cameras).

Advanced compacts, mirrorless cameras and semipro and professional DSLRs come equipped with even larger sensors ranging in size from a postage stamp (known as APS) to a comparatively huge "full-frame" sensor of about 1.5 by 1 inches found in top-of-the-line DSLRs. So, all other things being equal, an 8-megapixel DSLR will produce far better images than an 8-megapixel compact camera, just like the 8-megapixel compact will capture better images than your 8-megapixel smartphone.

MORE: DSLR vs. Mirrorless Cameras: Which Is Better for You?

Where megapixels do matter is the size you want your final picture to be. You need to have a camera or smartphone whose megapixel count matches how you plan to use your photographs. This is particularly important if you plan to print your pictures, because print quality is very dependent upon having enough data (pixels) to define the picture. (Please see tables for guidelines on how many megapixels you need for different size prints and for sharing on various social networks.)

Can you have too many megapixels?

Having more pixels than you really need can actually hurt image quality. That’s because when you upload an overly large picture to social media, output it to a printer or send it to a photo book producer, your image will be downsized automatically. In other words, the software or upload process will randomly delete pixels without the smarts to understand what might be critical in the picture, such as the sparkle in a child’s eye or the razor-sharp edge of a leaf.

Photos with too many megapixels also take much longer to upload and might even fail partway through. And if you're uploading on the go, you're eating into your wireless data cap more than you need to.

MORE: Best Free Photo Management Tools

Apps such as Aviary let you select the number of megapixels.

What’s more, even in this era of remarkably inexpensive hard drives and memory cards, extra- large photo files will quickly fill up storage space with unnecessary data that you probably won’t need, use or want.

Of course with the continuing megapixel inflation by camera makers, you may have no choice but to buy a camera with far more resolution than you need. Fortunately, traditional digital cameras, as well as camera apps for smartphones, allow you to adjust the resolution down, which is one option.

Another is to downsize the photos after you shoot them but before you upload them to a printing service or social networking site. Even basic, free photo editing apps allow you to select the output resolution. This option will fill up your memory card faster, but it has the benefit of giving you more flexibility, for example if you decide later that the quick snapshot you took is actually worthy of a full-size print.

How many megapixels do you need for prints?

For most people, the highest resolution files they will need will be for the occasional print or photo book. Here’s how you calculate the number of megapixels you’ll need for a printed photograph:

Determine the physical size of your print, such as 4 x 6 inches, 8 x 10 inches, etc. Then, multiply the width by 300, and the height by 300, which will give you the size in terms of pixels. (300 ppi — pixels per inch — is recommended for good-quality prints.) Therefore, an 8 x 10 inch print would be 2,400 x 3,000 pixels.

Multiply the width (in pixels) by the height (in pixels). So for that 8 x 10 inch print, it would be 2400 x 3000, which equals 7.2 million pixels.

Divide the result from step 2 by 1 million, and you have the number of megapixels you need to make a good print. In this case, the minimum resolution you’ll want your camera to have is 7.2 megapixels.

How many megapixels do you need for social network photos?

If, like many people, you never plan to print your pictures, your megapixel requirements will be far less. A Twitter photo, for example, measures just 375 x 375 pixels, which equals a mere 0.15 megapixels. A Facebook timeline photo, at 960 x 720, requires 0.69 megapixels.

MORE: Best Smartphone Cameras

At the bottom of the page is a chart that gives optimum megapixel counts for photos that you plan to print or upload to Twitter, Facebook, Google Photos, Instagram and Pinterest.

Adding extra megapixels for cropping

Professional photographers are usually careful about how they compose their pictures, making sure all the space in the screen or viewfinder is filled with what they want to capture before they click the shutter button. Most people, however, tend to include more visual real estate in photographs than they actually want or use, so they end up cropping out those extraneous areas. If you tend to crop your photos, look for a camera with about 50 percent to 75 percent more megapixels than the tables below recommend. Chances are, though, that even the cheapest cameras nowadays will have more than enough megapixels.

Karl Tate/Tom's Guide

Twitter

What size photo can I upload for my Twitter profile pic?

Twitter recommends that profile photos should be 400 x 400 pixels. The max file size for a profile photo is 2MB.

What size photo can I upload for my Twitter header pic?

Twitter recommends that header images be 1500 pixels wide by 500 pixels tall.

What’s the largest photo I can upload to Twitter?

Photos and animated GIFs on Twitter can be up to 5MB in size.

Facebook

What’s the largest-size photo I can upload to Facebook?

You can upload photos that are up to 2048 pixels in width. However, Facebook recommends that the files be no more than 15MB in size if they’re JPEGs, and 1MB in size if they’re PNGs.

What size should my Facebook cover photo be?

Your Facebook cover photo should be at least 720 pixels wide.

What size should my Facebook profile picture be?

Your Facebook profile photo should be at least 180 x 180 pixels. It will be displayed at 160 x 160 pixels on computers, 140 x 140 pixels on smartphones and 50 x 50 pixels on most feature phones.

Instagram

What’s the largest-size photo I can upload to Instagram?

The maximum resolution that Instagram supports is 2048 x 2048 on iOS; it varies on Android. However, Instagram scales photos down to a width of 1080 pixels. If you share a photo that’s less than 320 pixels wide, Instagram will enlarge it to 320 pixels.

How do I get Instagram to stop cropping my photos?

If your photo has a width that's between 320 and 1080 pixels, the aspect ratio must be between 1.91:1 and 4:5. So, a picture with a width of 1080 pixels must have a height that is between 566 and 1350 pixels.

Pinterest

What size should I make my Pinterest photos?

A standard pinned photo should be 736 pixels wide by 1128 pixels high. However, other sizes that will work are:

968 pixels wide by 650 pixels high

736 pixels wide by 490 pixels high.

Generally speaking, the width of a photo maxes out at 968 pixels, but it can be as tall as 3642 pixels.

LinkedIn

What size should my LinkedIn profile photo be?

Your LinkedIn profile photo should be between 400 x 400 and 20,000 x 20,000 pixels. However, the file can't be larger than 10MB.

What size should my LinkedIn background photo be?

Your background photo should be at least 1000 x 425 pixels.

Google Photos

What’s the largest-size photo you can upload to Google Photos?

Photos can't exceed 75MB or 100 megapixels. Videos can't exceed 10GB in size.

You May Also Like

Sally Wiener Grotta (www.Grotta.net) is a fine art photographer, author and speaker who has practiced and written about digital photography from its beginning. Follow her @SallyWGrotta, Google+.Follow us @tomsguide, on Facebook and on Google+.