One of the best things about the warm summer months is having the chance to break out the grill to try the best grilling recipes, crack open a beer, and start grilling some burgers for dinner.

But if you haven't made one in a few months—or this is your first time grilling—you can find yourself staring at the grill and wondering: Is the burger done? Is it still raw in the middle? Or worse: overcooked? Should I flip it? Augh! How do I know when it's ready to eat?

Put your worries to rest. Here's everything you need to know to cook a perfect burger safely while keeping it juicy and tasty, whether you're using a gas grill or a charcoal grill.

First: Do those grill grates look a little unloved? Get to work and clean 'em!

Proud Grill Company Q-Swiper BBQ Grill Cleaner Set

Q-Swiper BBQ Grill Cleaner Set
$17 at Amazon
Credit: Courtesy Amazon

Making the burger

You don't need a lot of fancy sauce or rubs to grill hamburgers. All you need is salt and pepper, and an understanding of how to form a burger patty so it's not too tough. This means not over-handling the ground beef, and putting a slight dent in the center of the patty so that it doesn't get too round when it cooks.

How long does a burger take to cook?

You may read elsewhere recommendations for grill times of 3 minutes, or 4 minutes, or even just 2 minutes per side, but the fact is that—especially when it comes to handmade burger patties—these are just estimations.

In truth, a burger can take anywhere from just a couple minutes to 10 or even 15 minutes total to fully cook. It depends on three main variables: how high the heat is, how thick the burger is, and whether you want it rare, medium rare (pink in the center), medium, medium well, or well done.

The thicker the beef patties, the longer they take to cook. It will also take more time if your grill or pan isn't as hot.

Lower temperatures also mean that the burger will take longer to get that crispy crust on the outside and will be more likely to dry out. For this reason, we recommend cooking at as high a temperature as you safely can. Not only does this reduce cooking times, but it is more likely to result in a juicier burger, with loads of flavor. And all you have to do is flip it when it's ready and take it off the heat when it's done.

How do I know when to flip a burger?

You may have read—or had some burger-master try to tell you—that you shouldn't over-flip a burger. The theory is that this will somehow prevent the meat from browning properly. So a few years ago scientist-cook J. Kenji López-Alt did an experiment on how flipping affected cooking, and discovered some good news: You can flip it as much as you like!

We do recommend letting the patty cook for at least 3 to 4 minutes before giving it a first flip, to give the meat time to sear. Otherwise, the patty may start to fall apart.

After that, however, you can flip it once and be done, or flip it as often as you like, trying to get both sides to cook and brown evenly. Either way, the important thing is to be attentive. You can always cook your burger a little longer, but there's not much you can do if it becomes overcooked.

How can you tell if a burger is done?

There are three main ways to tell if your hamburger is done. By far the safest, easiest, and simplest method is to simply purchase an instant read meat thermometer to be sure the center has reached an appropriate internal temperature.

ThermoPro ThermoPro Digital Meat Thermometer

ThermoPro Digital Meat Thermometer

Digital meat thermometers are inexpensive, very easy to use, and are handy for a whole variety of foods, from roast chicken to steak. To see if your burger is ready, just plunge the thermometer into the center of the burger.

We suggest putting the thermometer into the side of the burger—that way it's less likely to go all the way through the meat and give you a false reading.

At 120°F, the burger will be rare. At 130°F, it'll be medium-rare. 140°F is medium, 150°F is medium-well, and over 160°F is well done. The FDA recommends cooking all ground beef to 160°F, though we don't suggest cooking it much above that, or it will become dry and not very tasty.

If you don't have a thermometer, the second-best method is to take the burger off the heat, put it on a plate, and cut into it. The pinker the middle is, the rarer the burger is. This is better (and probably safer) than guessing, but the downside is that it can lead to having at least one semi-mutilated "test" burger that has lots of slices in it. It will still taste just fine, but it won't look as nice.

The third method is the so-called "finger test." This method takes some practice to get it right but if you can learn how to do it, it's a neat trick for showing off at barbecues and means you don't have to carry around a thermometer.

For this method you press a (clean) finger onto the meat and gauge how done it is by how firm it is—the firmer, the more well done. And for a handy point of comparison, you use the pad of flesh on your hand beneath your thumb.

Here's how: Hold your left hand up and use the index finger of your right hand to press on that pad of flesh. This is roughly the firmness of raw meat. Now touch your left thumb and forefingers together and touch that pad of flesh again. It's gotten firmer! The pad is now the firmness of rare meat.

Touch your left thumb and middle fingers together, and it's the firmness of medium-rare meat. Touch your left thumb and ring fingers together, and it's the firmness of medium-well meat. And if you touch your left thumb and pinky together, the pad is the firmness of well-done meat.

As you can imagine, it takes a little bit practice to get this right, and it's not nearly as accurate as a thermometer, or even as simply cutting open a burger and looking. We find that, typically, you need to go through a lot of burgers before getting the hang of it. But if you're in a pinch, give it a try!