A common saying about pizza is that even when it’s bad, it’s still good. For a group of researchers, that isn’t good enough.

An academic paper, titled “The Physics of Baking Good Pizza,” was published earlier this year in the preprint journal arXiv. Two physicists (Andrey Varlamov of the Institute of Superconductors, Oxides and Other Innovative Materials and Devices in Rome and Andreas Glatz of Northern Illinois University) and one food anthropologist (Sergio Grasso, an author and filmmaker based in Rome) looked to solve a long thermodynamic equation to simulate an Italian pizza.

The pie in question was Margherita, which features tomato, mozzarella, and basil. The authors watched as pizza after pizza was prepped and brick-oven-baked by a seasoned “pizzaiolo.” Using the knowledge they gained, they figured out the right conditions for a brick oven pizza, as well as how to recreate the brick oven pizza in an electric oven anywhere.

The long thermodynamic equation finds that a pizza cooked in an electric oven could meet similar conditions to a Roman brick oven by turning the heat down to 450 degrees F (230 degrees C) for 170 seconds. Additionally, pizzas that have ingredients with a higher water content, like vegetables, may need to be left in the oven longer, as the pizza will return more heat to the oven via evaporation.

To learn more about the research, read the paper here.