Skip to main content

The Actual Egg Timer

Times eggs, not minutes

2026-11-27 — 2026-11-30

quality 5
Bayes
decision theory
food
language
making things
Monte Carlo
physics
UI
Figure 1

Everyone is implementing their own apps now, to scratch their very particular itch. Mine is an egg timer. Rather, my ideal Nietzchean übermensch of an egg timer. It is online at actualeggtimer.netlify.app, and there is an iOS version in the App Store. Source is at danmackinlay/actual_egg_timer.

tl;dr:

  1. It computes time to optimum yolk softness by solving a heat equation given the state of my kitchen and protein denaturation kinetics.
  2. All phases of the cooking process, including warming the water and cooling down, are modelled.
  3. Moreover, it adaptively learns to improve using a particle filter, and user feedback.
  4. Translations include en-US, en-UK, and en-(Samuel Johnson). More soon.

1 Standard egg timers are underspecified

Most egg boiling recipes are of the form take them out N minutes after the water boils. But for any given person, the situation can differ along a number of dimensions: the size of the egg, the egg’s starting temperature, how the egg is cooled, even the local boiling point of water can vary.

If we start heating the water with the eggs already in, the heating time makes a huge difference. For example, let us say I want the yolk to have a “jammy” consistency. I intend to start the eggs in cold water and cool them in an ice bath. Then the time to eggs out is as follows:

time to boil total cook minutes after boiling
4 min 8.9 min 4.9 min
8 min 10.9 min 2.9 min
12 min 13.0 min 1.0 min

Which is to say, the “correct” cooking time at the boiling point varies by a factor of five. The intuition here is that an egg sitting the water is cooking even before the boiling point is reached and on a feeble enough stove it is mostly cooked before boiling. The app accounts for all of that.

2 Physics model

Figure 2

The physics model was devised with serious assistance from a Claude lit review based especially on Williams (1998) and Buay et al. (2006). The egg is a sphere, in a heat bath at the (changing) water temperature. There is a standard textbook solution for conductive heat dynamics, which gives us an eigenfunction series in the Fourier number \(\mathrm{Fo} = \alpha t / R^2\). Here \(t\) is the time since the egg went in, \(R\) is the radius of a sphere with the same volume as the egg, and \(\alpha\) is the egg’s thermal diffusivity, i.e. how fast heat spreads through it, in m²/s. The eigenmodes then give us the state, forced by the rate of change of the heat bath temperature (“Duhamel’s principle’):

\[ b_n'(t) = -\lambda_n b_n(t) - c_n T_s'(t),\qquad \lambda_n = \alpha\left(\frac{n\pi}{R}\right)^2. \]

This is exact for piecewise linear temperature functions, and nice and stable to solve. It is also simple enough to implement in both JS and Swift.

To stop numerical artefacts from non-smooth changes, we smooth sharp changes in temperature. If we want a physical rationalization for it, let us say, this models the fact that the egg itself takes a while to move.

2.1 Yolk temperature

The standard physicist’s egg formula is C.D.H. Williams’ (Williams 1998) which solves for cook time \(t\) as

\[ t = \frac{M^{2/3}\, c\, \rho^{1/3}}{K \pi^2 (4\pi/3)^{2/3}} \ln\left( 0.76\, \frac{T_\text{water} - T_\text{egg}}{T_\text{water} - T_\text{yolk}} \right), \]

where \(M\) is the egg’s mass, \(c\), \(\rho\) and \(K\) its heat capacity, density and thermal conductivity, \(T_\text{egg}\) its starting temperature and \(T_\text{yolk}\) the temperature the yolk should ideally attain. We call \(\alpha = K/(\rho c)\) the diffusivity. For an ideal sphere in a heat bath at \(T_\text{water}\), the temperature at fractional radius \(x = r/R\) would be

\[ \frac{T(x,t) - T_\text{water}}{T_\text{egg} - T_\text{water}} = 2 \sum_{n=1}^{\infty} (-1)^{n+1}\, \mathrm{sinc}(n\pi x)\, e^{-n^2\pi^2 \mathrm{Fo}}. \]

Williams’ formula is what we get by keeping only the \(n=1\) term and solving for \(t\). The 0.76 is that term’s coefficient, \(2\,\mathrm{sinc}(\pi x)\), evaluated at approximately the boundary of the yolk, where the yolk has about a third of the egg’s volume, so \(x = (1/3)^{1/3} = 0.693\) and \(2\,\mathrm{sinc}(\pi \cdot 0.693) = 0.755\).1

1 For those following along at home, Buay et al. (2006) target instead the temperature of the centre of the yolk.

Dropping the higher terms is fine for \(\mathrm{Fo} > 0.2\). However, soft-boiling requires \(\mathrm{Fo} \approx 0.07\) and we cannot drop that term, or we undershoot by about 8%.

2.2 Doneness and dosing

Protein denaturation is, I am told, roughly first-order in the fraction of protein still native at each point in the egg: the rate at which protein unfolds is proportional to how much is still folded. The rate constant varies with temperature. This first-orderness cashes out in the understanding that how far it has gone depends on the integral of the rate constant over time. Vega and Mercadé-Prieto (2011) find 469 kJ/mol to yolk gelation between 54 and 70°C. That means an extra 4.65°C makes the reaction ten times faster. Call that temperature step \(z\), so \(z = 4.65\) K for yolk, and the rate goes as \(10^{(T - T_\text{ref})/z}\) near reference temperature \(T_\text{ref}\). The timer thus should target an desired thermal dose, in equivalent minutes at \(T_\text{ref}\),

\[ \Phi(t) = \int_0^t 10^{(T(\tau) - T_\text{ref})/z}\,d\tau, \]

where we care about this value for the yolk at the centre of the egg and also for the white at the yolk boundary.

The doneness slider sets the logarithm of the yolk dose, \(\log_{10}(10^{T/z})=T/z\), which is to say, even though our target is some fancy heat dose, we may as well just think in terms of target temperature. Runny seems to be about 56°C and 77 °C is hard2.

2 The “gel point” for yolk per Vega and Mercadé-Prieto (2011) is about 2/3 of the way along this slider (between jammy and hard in the app’s terms).

3 Cooling

Whatever dose we want, when we take the egg out of the cooking pot, it is only part way done— while the exterior might be 100°C, the middle is still increasing in temperature as the head diffuses inwards. For example, if we vary the cooling method, we see serious variation in the yolk temperature:

cooling method peak yolk temp
ice bath 65.0 °C
cold running water 65.6 °C
bowl of water 65.9 °C
left out in the air 75.3 °C
perfectly insulated 83.9 °C

Which is to say, the cooling method, typically ignored in recipes, turns out to be crucial. Indeed if we want to get soft yolks after boiling we need water cooling, or to eat the egg straight away before it has even finished cooking.

Air cooling calculations were fiddly. The solver applies Newton’s law of cooling at the shell itself, with a heat transfer from free convection plus radiation, and accounts for the latent heat of the film of water the egg carries out of the pan.

4 Meeting reality

A fancy physics model is all well and good, but it is an idealization. We want this to work for real eggs, which will deviate from the mathematical idealizations in all kinds of ways. Thus we get the app to update based on empirical evidence.

Each time the cook uses this time, the app asks, optionally, how whether it achieved the target white and yolk consistency. Those answers feed a particle filter, which uses an appropriate kernel (Liu and West 2001). Over time the app recalibrates its estimate to the world as it is, rather than stubbornly sticking to the idealized physics model calibrated to guesses.

There are a lot of parameters in the physics model, and thus a lot of candidate parameters to learn. We cannot do all of them, not least because they are mostly indistinguishable with respect to the observations we take per default (“too runny”/“too hard”).

It seems like we can probably estimate something like a time scale, and also the idiosyncratic taste parameters for a given user (how much my “soft” matches your “soft”) etc. By that same token, the surface heat transfer coefficient in the water is separable from the diffusivity in principle (the two are 19° apart, since one hits the yolk centre harder than the white) but has a signal fifteen times weaker, so it will never be learned the natural experiment of cooking a breakfast snack.

Egg nerds can increase the informativeness of their experiment by using a probe thermometer. The app offers to use data from a probe inserted into the egg at the end of cooking, where the middle of the yolk is predictable (and to me, slightly unintuitively) the hottest part of the eegg.

4.1 Decision theory

The recommended cooking times are chosen to minimize to following loss function

\[ P(\text{yolk too soft}) + P(\text{yolk too firm}) + 3\,P(\text{white runny}), \]

averaged over the posterior. The 3 is a judgement that a runny white is worse than a slightly firm yolk, leaning towards over- rather than under-cooking.

4.2 Crowd-sourcing

What would an app be without an un-requested social feature? This app has the feature of doing citizen science. It will, (if opted-in) upload my observations of egg-cookedness to the cloud and collate the data with that of other users. Eventually, as millions, nay billions of people use this, what must surely be the best egg timer imaginable, we will collectively make it better by pooling all our data into the highest-precision, subtlest, most profound. What one kitchen cannot learn because its cook never varies the egg size or the cooling, a population varies for free. So there is an upload function that records the user’s cooking, and how it turned out, and uses it not only to refine their personal estimates, but also to help the great mass of humanity in their own struggles with the vicissitudes of picnic eggs. The entire thing is minimal and privacy-first: opt-in, deletable, anonymized to a random ID. So you can cook your eggs whichever perverted, asinine way free from the fear that I will track you down and shame you from your IP address. The model updates both global effects (“the egg model is inaccurate”) and idiosyncratic effects (“there is no accounting for taste”).

Implementation details: A hierarchical model in JAX, checked by simulation-based calibration. For users who participate in the experiment, the app will add a 10 second jitter to the recommended timing to make the data sampled more informative. That costs a little bit in accuracy (estimated 49.3% of eggs are perfect, as opposed to 52.1%). This can be switched off if it is annoying.

5 Planned Features

  • Infinite scroll for infinite eggs
  • Personalized cooking recommendations based past usage (Spoiler: it will recommend more boiled eggs)
  • Cryptocurrency integration, allowing users to store their data on the Bockchain
  • AI-inference by mixture-of-eggsperts
  • Czech translation

jk jk this is an egg timer. Only one of these features will actually be implemented.

6 Incoming

7 References

Abbasnezhad, Hamdami, Monteau, et al. 2016. “Numerical Modeling of Heat Transfer and Pasteurizing Value During Thermal Processing of Intact Egg.” Food Science & Nutrition.
Almonacid, Simpson, and Teixeira. 2007. “Heat Transfer Models for Predicting Salmonella Enteritidis in Shell Eggs Through Supply Chain Distribution.” Journal of Food Science.
Baldwin. 2012. “Sous Vide Cooking: A Review.” International Journal of Gastronomy and Food Science.
Buay, Foong, Kiang, et al. 2006. “How Long Does It Take to Boil an Egg? Revisited.” European Journal of Physics.
Carter. 1974. “The Hen’s Egg: Estimation of Shell Superficial Area and Egg Volume from Four Shell Measurements.” British Poultry Science.
Coimbra, Gabas, Minim, et al. 2006. “Density, Heat Capacity and Thermal Conductivity of Liquid Egg Products.” Journal of Food Engineering.
Denys, Pieters, and Dewettinck. 2003. “Combined CFD and Experimental Approach for Determination of the Surface Heat Transfer Coefficient During Thermal Processing of Eggs.” Journal of Food Science.
———. 2004. “Computational Fluid Dynamics Analysis of Combined Conductive and Convective Heat Transfer in Model Eggs.” Journal of Food Engineering.
Di Lorenzo, Romano, Ciriaco, et al. 2025. “Periodic Cooking of Eggs.” Communications Engineering.
European Commission. 2008. “Commission Regulation (EC) No 589/2008, Article 4: Egg Weight Grading.”
Hoyt. 1979. “Practical Methods of Estimating Volume and Fresh Weight of Bird Eggs.” The Auk.
Liu, and West. 2001. “Combined Parameter and State Estimation in Simulation-Based Filtering.” In Sequential Monte Carlo Methods in Practice. Statistics for Engineering and Information Science.
Lorig. 2026. “How to Cook a Soft-Boiled Egg Optimally: A Laplace-Transform Solution of a Two-Domain Heat Equation.”
Powrie, and Nakai. 1985. “Characteristics of Edible Fluids of Animal Origin: Eggs.” In Food Chemistry.
Romanoff, and Romanoff. 1949. The Avian Egg.
Roura, Fort, and Saurina. 2000. “How Long Does It Take to Boil an Egg? A Simple Approach to the Energy Transfer Equation.” European Journal of Physics.
Sabliov, Farkas, Keener, et al. 2002. “Cooling of Shell Eggs with Cryogenic Carbon Dioxide: A Finite Element Analysis of Heat Transfer.” Lebensmittel-Wissenschaft Und-Technologie.
Stull. 1947. “Vapor Pressure of Pure Substances. Organic and Inorganic Compounds.” Industrial & Engineering Chemistry.
Unsworth, and Duarte. 1979. “Heat Diffusion in a Solid Sphere and Fourier Theory: An Elementary Practical Example.” American Journal of Physics.
Vega, and Mercadé-Prieto. 2011. “Culinary Biophysics: On the Nature of the 6X°C Egg.” Food Biophysics.
Weijers, Barneveld, Cohen Stuart, et al. 2003. “Heat-Induced Denaturation and Aggregation of Ovalbumin at Neutral pH Described by Irreversible First-Order Kinetics.” Protein Science.
Williams. 1998. “The Science of Boiling an Egg.”