The best baked mac and cheese recipe is a custard-style bake: cooked elbow macaroni folded into a seasoned cheese sauce, poured into a buttered 9-by-13-inch dish, topped with buttered crumbs, and baked at 350°F until the center reads 165°F on an instant-read thermometer, about 35 to 40 minutes. The custard method—where eggs and evaporated milk set around the pasta—beats the roux-based version on one specific point: it stays creamy for 60 to 90 minutes after baking, while a flour-thickened sauce tightens as it cools. The catch is that the eggs must be tempered. If you pour hot sauce into cold eggs, you get sweet scrambled eggs in your pasta.
A note on what this recipe is and isn't. It uses cheddar, Gruyère, and a small amount of American cheese for meltability. It is not a stovetop recipe with a broiler finish, and it does not use a béchamel base. The choice matters because the two methods fail differently—roux sauces turn grainy under high heat, custards turn watery when underbaked—and the recipe below is built around the custard's specific failure modes.
Why the Custard Method Beats a Roux Sauce at the Table
Custard mac and cheese holds its texture longer because the eggs coagulate into a soft gel around the pasta rather than relying on starch granules to swell and trap water. A roux-thickened cheese sauce firms up as it cools, so the last serving from the dish is closer to a slice than a scoop. Cook's Illustrated's test kitchen has documented this trade-off repeatedly: roux sauces are more predictable but less forgiving to reheat.
The custard also bakes at a temperature that protects the cheese. At 350°F, cheddar's proteins don't squeeze out their fat as quickly as they do at 400°F or under a broiler. The evaporated milk contributes a stabilizer—its concentrated milk proteins buffer the sauce against heat shock—which is why canned evaporated milk, not fresh milk, is the correct liquid here.
The timing is the honest downside. A roux version is done in 25 to 30 minutes; the custard version needs 35 to 40 minutes in the oven plus 10 minutes of resting before serving. That resting window is not optional. The custard needs 10 minutes to set at the edges before you cut into it, or the sauce will run across the plate.
The Cheese Blend: What Each Variety Contributes and Why 10 Ounces
The 10-ounce total breaks down as 6 ounces sharp cheddar, 3 ounces Gruyère, and 1 ounce American cheese. Each plays a distinct role. Sharp cheddar carries the flavor, Gruyère brings nutty depth and melts smoothly, and the American cheese supplies sodium citrate, which emulsifies the fats and keeps the sauce from breaking when it hits the oven.
Use block cheese and grate it yourself. Pre-shredded cheese is coated in potato starch or cellulose to prevent clumping in the bag, and that coating keeps the shreds from melting into a unified sauce—you'll get a slightly grainy, separated texture. A box grater or the shredding disc of a food processor handles 10 ounces in about three minutes.
Aged cheddar at 12 months or older has less moisture than a young 3-month cheddar, so choose one or the other, not both, and adjust the evaporated milk slightly if you go very old. Very aged cheeses need about an extra two tablespoons of liquid because their crumbly protein structure absorbs more.
Substitutions work within limits. Swap the Gruyère for smoked Gouda (adds smoke, loses nuttiness), the cheddar for Colby Jack (milder, melts better, less bite), or the American for a second ounce of fontina if you want to skip processed cheese and accept a slightly looser bake.
Ingredients, Exact Weights, and One Substitution That Works
| Ingredient | Weight or Volume | Notes |
|---|---|---|
| Elbow macaroni | 1 pound (454 g) | Cavatappi also works; ziti adds 3 minutes |
| Sharp cheddar, block | 6 oz (170 g) | 12-month aged preferred |
| Gruyère, block | 3 oz (85 g) | Comté substitutes directly |
| American cheese | 1 oz (28 g) | Deli slice, not the foil-wrapped singles |
| Evaporated milk | 1 12-oz can (354 mL) | Not condensed milk |
| Whole eggs | 2 large | Room temperature |
| Dry mustard | ½ tsp (1 g) | Colman's or a Dijon-style powder |
| Cayenne | ¼ tsp (0.5 g) | Optional but recommended |
| Unsalted butter | 4 oz (113 g) | Divided: 2 oz for the dish, 2 oz for the topping |
| Kosher salt | 1 tbsp for pasta water | Diamond Crystal; halve for Morton's |
| Panko breadcrumbs | 1 cup (60 g) | Standard dry panko, not seasoned |
The one substitution worth knowing: evaporated milk can be replaced with 1 cup whole milk plus 2 tablespoons of nonfat dry milk powder, whisked to dissolve before it hits the pan. This supplies the same concentrated milk proteins without the faint caramelized note canned evaporated milk gets from its canning process.
Building the Custard Without Scrambling It
The custard is where home cooks lose this dish. Get the tempering right and the rest of the process is forgiving. Get it wrong and no amount of cheese hides the texture.
1: Heat 3½ cups of water to a boil in a large pot, add 1 tablespoon kosher salt, and cook the pound of macaroni for 2 minutes less than the package's al dente time. Drain and rinse briefly under cool water to stop cooking; the pasta finishes in the oven. 2: Butter a 9-by-13-inch glass or ceramic baking dish with 2 tablespoons of the softened butter. Glass conducts heat more slowly than metal, which is why the recipe calls for 350°F and a full 35-minute bake; a metal pan runs about 8 minutes faster. 3: Whisk the 2 eggs, the can of evaporated milk, the dry mustard, and the cayenne in a large bowl until uniform—about 30 seconds of steady whisking. Set it next to the stove. 4: Warm 3 tablespoons of the butter in a medium saucepan over medium heat until it foams, then whisk in the grated cheddar, Gruyère, and American cheese in three additions, stirring each until melted before the next. Add the remaining ¼ cup of evaporated milk if the sauce looks tight. 5: Ladle about ½ cup of the hot cheese sauce into the egg mixture while whisking constantly. Repeat with a second ½ cup. The whisk has to keep moving; a stationary bowl receives a streak of cooked egg that you cannot undo. 6: Pour the tempered egg mixture back into the saucepan and whisk to combine, then fold in the drained pasta. Transfer everything to the buttered dish. 7: Melt the remaining 2 tablespoons of butter, toss with the cup of panko and a pinch of salt, and scatter evenly over the top. Bake at 350°F for 35 to 40 minutes, until the custard is set at the center—165°F on an instant-read thermometer—and the crumbs are golden brown. 8: Rest 10 minutes on a wire rack before serving. The carryover heat continues setting the custard while the dish cools; cutting early gives you a runny first portion.
If the sauce breaks during step 4—visible oil pooling at the edges—pull the pan off the heat and whisk in a tablespoon of cold evaporated milk or a splash of the pasta water. A custard that never sets after 45 minutes means the oven is running cool; check with an oven thermometer rather than trusting the dial.
What the Oven Thermometer Reveals That the Dial Doesn't
Home oven dials are often 25 to 50°F off from the actual temperature, and that swing is the leading cause of a custard that overcooks at the edges before it sets in the middle. A $10 oven thermometer hung from the center rack closes that gap. It's the single cheapest fix for baked-pasta problems.
Custard is done at 165°F in the center, and the thermometer should be inserted at a 45-degree angle to the bottom of the dish, stopping when the tip hits the middle of the custard layer—not the pasta beneath it. The difference between 165°F and 180°F is the difference between a creamy scoop and a rubbery one.
Egg coagulation happens fast: the custard moves from runny to set within roughly 4 minutes of hitting 160°F. That's why the window between "underbaked" and "overbaked" is so narrow, and why the visual cue of golden crumbs is less reliable than the temperature reading.
The Topping, Resting Times, and Why Panko Beats Fresh Breadcrumbs
Panko outperforms fresh breadcrumbs on a baked mac and cheese because its larger surface area stays crisp longer. Fresh crumbs absorb sauce from below and turn soft within 10 minutes; panko's flaky structure resists that for 20 to 30 minutes. Toss the cup of panko with 2 tablespoons of melted unsalted butter and a pinch of salt, and scatter it in an even layer.
The 10-minute rest is where the dish sets up. Cutting in earlier gives you a runny first portion, and the sauce leaks across the plate instead of sitting in the spoon. The rest also allows carryover cooking to finish the center without drying the edges.
Make-ahead works: assemble the dish up to 24 hours ahead, cover with plastic pressed to the surface, and refrigerate. Add 10 minutes to the bake time and expect a slightly looser sauce—the custard absorbs some liquid during refrigeration. Do not bake from frozen.
Food Safety, Leftovers, and the 165°F Standard
Custard-based mac and cheese is a protein-rich dish and falls under the USDA's two-hour rule: it should not sit at room temperature for more than 2 hours after baking. Refrigerate leftovers within 2 hours in a shallow container; a covered 9-by-13-inch dish is too deep to cool quickly at the center.
Reheat leftovers to 165°F, per USDA guidance, whether in a 325°F oven for 15 to 20 minutes, covered, or in the microwave on 70% power. Reheated custard will be looser than fresh—the egg matrix doesn't fully reconstitute—so plan for that texture rather than expecting a match.
The dish holds for up to 4 days refrigerated. Freezing is possible but drops the quality: the custard separates during thaw, and while it remains safe to eat when reheated to 165°F, the sauce weeps. If freezing, portion into single servings so you reheat only what you need.
Cost, Yield, and a Per-Serving Breakdown for Eight
The full dish runs about $9 to $13 in grocery cost depending on where you buy the cheese, which works out to roughly $1.15 to $1.65 per serving across 8 portions. The Gruyère is the expensive item—about $5 to $7 for 3 ounces—and sharp cheddar plus a good deli American slice adds $3 to $4. The pasta, evaporated milk, eggs, butter, and panko together run about $2.
Cost comparison per serving: a boxed mac and cheese runs about $0.30 to $0.60 per serving but delivers a fraction of the cheese weight. A restaurant side of baked mac and cheese at a casual dinner house typically runs $5 to $8 per portion. The custard bake lands roughly 70% below the restaurant price while containing three times the cheese by weight per serving than the boxed version.
The yield is eight generous portions in a 9-by-13-inch dish, or 12 smaller sides. The recipe scales poorly for a 9-by-13-inch pan sized for eight—doubling it requires two pans, since a single deep pan will have a cold center and a custard that won't set in 40 minutes.
Troubleshooting: Grainy, Watery, and the Scrambled-Egg Failure
Grainy sauce comes from overheating: cheddar's casein proteins denature above 175°F and squeeze out their fat. If you see graininess, it's already happened, and adding liquid won't fix it—the dish is still edible, but the texture is set. Bake custard at 350°F and pull it at 165°F to avoid this.
Watery custard is the signature of underbaking. If the center is still jiggly when you pull it, the custard never reached its gel set point; return the dish to the oven and check again every 3 minutes, or accept a looser texture at serving. Scrambled-egg curds in the sauce trace back to a broken temper.
The failure case worth planning for is a cold dish straight from the refrigerator. A dish assembled and refrigerated overnight needs 45 to 50 minutes at 350°F, not 35, because the center starts at 40°F instead of room temperature and needs longer to reach 165°F. The thermometer is your tool for that adjustment.
FAQ
What's the difference between baked mac and cheese and macaroni and cheese?
Baked mac and cheese finishes in the oven; stovetop macaroni and cheese finishes on the burner. The baked version gets a crunchy topping and, in the custard method, a set structure. Stovetop sauces require stirring at the end and can't hold their shape once plated—the baked dish cuts into wedges if you let it rest.
How do I make baked mac and cheese creamy, not dry?
Pull it from the oven at 165°F and not a degree higher. Custard sets into a moist gel in the 160°F to 165°F band and tightens noticeably above 170°F. Ensure evaporated milk and two eggs per pound of pasta are in the sauce—the ratio is what keeps the interior moist. Resting 10 minutes helps the interior finish while the edges firm up.
Can I use pre-shredded cheese instead of grating my own?
Yes, with a trade. Pre-shredded bags contain starch or cellulose to prevent clumping, and the coating keeps shreds from melting into a smooth sauce, so the result is grainier. Stirring the shreds over low heat and letting them melt slowly rather than adding them all at once reduces the problem but doesn't fully solve it.
What temperature should the inside reach for baked mac and cheese?
165°F at the center. The dish comes from the oven at that temperature, then cools during a 10-minute rest to a serving temperature of about 145°F to 155°F inside. Use an instant-read thermometer inserted into the custard layer, not touching the pan bottom. That reading is the single most reliable doneness check.
Can I bake it ahead of time and reheat it?
Yes, reheat leftovers covered in a 325°F oven for 15 to 20 minutes or in the microwave on 70% power, until the center reaches 165°F again, per USDA reheating guidance. Reheated custard is looser than fresh, and the topping softens; those changes are normal. Keep refrigerated no longer than 4 days.
Is American cheese really necessary in the blend?
The 1 ounce of American cheese lends sodium citrate, an emulsifying salt that keeps the cheese sauce smooth and prevents it from breaking in the oven. Skip it and the sauce works, but expect a slightly oilier surface and less tolerance for oven time. Fontina or a second ounce of Gruyère is the closest substitute; a splash of lemon juice isn't a replacement.
How does the cost compare to boxed mac and cheese?
This recipe runs roughly $9 to $13 for 8 servings, about $1.15 to $1.65 per portion, and it carries three times the cheese by weight per serving vs. the boxed version's powder. Boxed runs $0.30 to $0.60 per serving. The custard recipe is not cheaper, but it's meaningfully less expensive per serving than restaurant sides at $5 to $8.
Does the shape of the pasta actually matter?
Yes. Elbows trap the most custard because their curve nests within itself, and cavatappi holds slightly more sauce because of its ridges plus a larger internal volume. Ziti needs 3 extra minutes in the oven and often ends up firmer than the dish around it; penne points collect sauce unequally.
The Takeaway
Cook the pasta two minutes short of the package time, temper the eggs slowly with hot sauce, grate your own cheese, and bake at 350°F to 165°F on a thermometer. Those four moves are the recipe. Everything else—which cheddar, whether you use panko or fresh crumbs—bends to your preference.
The custard method gives you a dish that holds its texture for an hour after it comes out of the oven, which the roux method doesn't. Plan for 35 to 40 minutes of bake time plus a 10-minute rest. The per-serving cost lands around $1.15 to $1.65 across 8 portions, well under the restaurant side dish it replaces.