The Best Baked Mac and Cheese Recipe (From Scratch)

This post may contain affiliate links, which means I may earn a small commission if you make a purchase through these links — at no extra cost to you. Thank you for supporting the content I create here on the blog! You can read my full Disclosure Policy for more details.
In this article
There are few dishes more universally loved than baked mac and cheese. It’s nostalgic, cozy, and somehow manages to feel both indulgent and comforting at the same time. It’s the dish you make for Sunday dinners, holidays, cold nights, and “just because” moments when you need something warm and familiar.
And while there’s absolutely a time and place for boxed mac and cheese, this is not that recipe.
This is real-deal, from-scratch baked mac and cheese—the kind with a silky cheese sauce, tender pasta, and a golden, crunchy topping that makes you go back for seconds (and thirds). It’s classic, unfussy, and reliable in the best way—the kind of recipe you’ll bookmark, save, and make again and again.
If you’ve ever been intimidated by homemade cheese sauce or worried your baked mac and cheese would turn out dry, I promise: this version is approachable, forgiving, and worth every minute.
Why This Is That Mac and Cheese Recipe
Let’s talk about what makes a truly great baked mac and cheese—because not all mac and cheese is created equal.
This recipe is:
- Made entirely from scratch (no shortcuts, but no stress either)
- Creamy, not grainy, thanks to a simple, classic roux-based sauce
- Perfectly baked, so it stays rich inside with a crisp, golden top
- Customizable, whether you’re feeding picky eaters or cheese lovers
Think: Sunday dinner comfort meets holiday-worthy side dish. Casual enough for a weeknight, special enough for Thanksgiving.
Let’s Talk Cheese (Because It Matters)
If there’s one thing that can make or break homemade mac and cheese, it’s the cheese.
Here’s the rule of thumb: always shred your own cheese. Pre-shredded cheese contains anti-caking agents that keep it from melting smoothly, which can lead to a gritty sauce.
Best Cheeses for Baked Mac and Cheese
- Sharp cheddar: Classic, bold, and essential
- Gruyère: Adds depth and an ultra-smooth melt
- Mozzarella: For extra stretch and creaminess
- Smoked gouda: Optional, but adds a subtle smoky flavor
A favorite combination? Sharp cheddar + gruyère, with a little mozzarella if you like it extra gooey.
Ingredients
Before you scroll and panic, take a look at the ingredient list. Everything here is simple, familiar, and easy to find—no specialty items or complicated add-ins required.
This recipe works because each ingredient plays a clear role, from building a silky-smooth sauce to creating that golden, crunchy topping. With just a handful of well-chosen staples, you end up with a baked mac and cheese that feels both effortless and dependable.
This recipe serves 8 people as a main dish or 10–12 people as a side dish.
For the Mac and Cheese
- 1 lb elbow macaroni
- 4 tablespoons unsalted butter
- 4 tablespoons all-purpose flour
- 3½ cups whole milk
- 2½ cups freshly shredded sharp cheddar cheese
- 1½ cups freshly shredded gruyère cheese (or mozzarella)
- 1½ teaspoons kosher salt
- ½ teaspoon black pepper
- ½ teaspoon mustard powder (optional but recommended)
- ¼ teaspoon paprika (optional)
For the Topping
- 1 cup panko breadcrumbs
- 2 tablespoons butter, melted
- ½ cup shredded cheese (optional, for extra cheesiness)
How to Make Baked Mac and Cheese From Scratch
Take a breath—this is easier than it looks, and once you’ve done it once, you’ll never be intimidated by homemade mac and cheese again.
Step 1: Preheat the Oven and Prep Your Baking Dish
Start by preheating your oven to 375°F (190°C).
Lightly butter a 9×13-inch baking dish (or a similar-sized casserole dish) and set it aside. This prevents sticking and makes cleanup easier later—future you will be grateful.
Step 2: Cook the Pasta
Bring a large pot of water to a rolling boil. Add a generous handful of salt—the water should taste like the ocean. This is your chance to season the pasta itself.
Add 1 pound of elbow macaroni and cook it 1–2 minutes less than the package instructions. You want the pasta al dente because it will continue cooking in the oven.
Drain the pasta well and set aside. Do not rinse it—the starch helps the sauce cling.
Step 3: Make the Roux (The Base of the Cheese Sauce)
In a large saucepan or deep skillet, melt 4 tablespoons of unsalted butter over medium heat.
Once melted, whisk in 4 tablespoons of all-purpose flour. Whisk constantly for 1–2 minutes, until the mixture looks smooth and slightly foamy and smells just a bit nutty—but not browned.
This step is important: cooking the flour briefly removes any raw taste and sets the foundation for a smooth sauce.
Step 4: Slowly Add the Milk
Reduce the heat slightly to medium-low.
Very slowly whisk in 3½ cups of whole milk, about ½ cup at a time. Whisk well after each addition to keep the sauce smooth and lump-free.
Once all the milk is added, continue cooking the sauce, whisking frequently, for 5–7 minutes, until it thickens enough to coat the back of a spoon. It should look creamy, not stiff.
If it feels thick too quickly, lower the heat—it should thicken gently, not aggressively.
Step 5: Season the Sauce
Once thickened, season the sauce with:
- 1½ teaspoons salt
- ½ teaspoon black pepper
- ½ teaspoon mustard powder (optional but highly recommended)
- ¼ teaspoon paprika (optional)
Whisk everything together and taste. This is your moment to adjust seasoning before the cheese goes in.
Step 6: Add the Cheese (Off the Heat)
Remove the saucepan from heat. This is key for a smooth, non-grainy sauce.
Gradually stir in:
- 2½ cups freshly shredded sharp cheddar cheese
- 1½ cups freshly shredded gruyère (or mozzarella)
Add the cheese in small handfuls, stirring gently until fully melted before adding more. The sauce should become silky, thick, and glossy.
If it seems very thick, that’s okay—but it shouldn’t look dry.
Step 7: Combine Pasta and Cheese Sauce
Add the cooked pasta directly into the cheese sauce. Using a spatula, gently fold until every piece of pasta is fully coated.
At this stage, the mixture should look almost too creamy. That’s exactly what you want—baking will absorb some moisture.
Step 8: Assemble the Mac and Cheese
Pour the mac and cheese into your prepared baking dish and spread it evenly.
In a small bowl, mix:
- 1 cup panko breadcrumbs
- 2 tablespoons melted butter
Sprinkle the breadcrumb mixture evenly over the top. Finish with an extra ½ cup shredded cheese if desired (highly encouraged).
Step 9: Bake Until Golden and Bubbly
Place the dish uncovered in the oven and bake for 25–30 minutes, until the top is golden brown and the edges are bubbling.
If you want extra browning, you can broil for 1–2 minutes, watching closely so it doesn’t burn.
Step 10: Rest and Serve
Remove the mac and cheese from the oven and let it rest for 5–10 minutes before serving.
This short rest allows the sauce to set slightly, making it creamier and easier to serve without drying out.
Scoop, serve warm, and prepare for compliments.
Tips for the Creamiest Baked Mac and Cheese
- Don’t overbake. Dry mac and cheese usually means too much oven time.
- Sauce should be loose before baking. The oven will tighten it up.
- Season in layers. Salt the pasta water and season the sauce thoughtfully.
- Let it rest. A short rest makes a big texture difference.
Easy Variations You’ll Love
Once you’ve mastered the base recipe, it’s easy to make it your own:
- Add crispy bacon or pancetta
- Stir in roasted broccoli or sautéed mushrooms
- Make it spicy with jalapeños or a pinch of cayenne
- Swap in gluten-free pasta and breadcrumbs if needed
This recipe is endlessly adaptable, which is part of what makes it such a keeper.
Make Ahead, Storage, and Reheating
You can assemble this mac and cheese up to a day in advance—just cover and refrigerate, then bake when ready. Add a splash of milk before reheating to bring the creaminess back.
Leftovers keep well in the fridge for 3–4 days and reheat beautifully in the oven or microwave.
FAQs About The Best Baked Mac and Cheese Recipe (From Scratch)
Can I make baked mac and cheese ahead of time?
Yes, baked mac and cheese is a great make-ahead dish. You can assemble the mac and cheese fully, cover it tightly, and refrigerate it for up to 24 hours before baking. When ready to cook, let it sit at room temperature for about 20 minutes, then bake as directed. If the mixture looks a little dry, add a small splash of milk before baking.
Why did my baked mac and cheese turn out dry?
Dry baked mac and cheese is usually caused by overbaking or starting with a sauce that’s too thick. The cheese sauce should look slightly loose before it goes into the oven, as the pasta absorbs moisture while baking. Baking uncovered for too long can also dry it out, so keep an eye on it toward the end.
Should baked mac and cheese be covered while baking?
No, baked mac and cheese is best baked uncovered. This allows the breadcrumb topping to turn golden and crisp while the inside stays creamy. If the top is browning too quickly, loosely tent it with foil during the last few minutes of baking.
What is the best cheese for baked mac and cheese?
The best cheese for baked mac and cheese is a combination of cheeses that melt smoothly and add flavor. Sharp cheddar provides classic mac and cheese flavor, while gruyère or mozzarella adds creaminess and depth. Always shred your own cheese for the smoothest sauce.
Can I use pre-shredded cheese?
It’s not recommended. Pre-shredded cheese contains anti-caking agents that prevent it from melting smoothly, which can result in a grainy or dull cheese sauce. For the creamiest baked mac and cheese, freshly shredded cheese makes a noticeable difference.
Can I make baked mac and cheese without eggs?
Yes, this baked mac and cheese recipe does not use eggs. The creamy texture comes from a roux-based cheese sauce rather than custard-style baking, which keeps the mac and cheese rich, smooth, and never rubbery.
What pasta works best for baked mac and cheese?
Elbow macaroni is the most classic choice because it holds the cheese sauce well, but other short pasta shapes like cavatappi, shells, or rotini work just as well. Choose a pasta with curves or ridges so the sauce clings to every bite.
How do I reheat baked mac and cheese without drying it out?
To reheat baked mac and cheese, add a splash of milk or cream before warming it in the oven or microwave. Covering it loosely while reheating helps trap moisture and keeps the dish creamy instead of dry.
Can I freeze baked mac and cheese?
Yes, baked mac and cheese can be frozen. For best results, freeze it before baking, tightly wrapped, for up to 2 months. When ready to eat, thaw overnight in the fridge and bake as directed. You can also freeze leftovers, though the texture is best when freshly baked.
How long does baked mac and cheese last in the fridge?
Stored in an airtight container, baked mac and cheese will keep well in the refrigerator for 3–4 days. Reheat gently with a little added milk to refresh the sauce.

