How coffee-cup slosh resonance is estimated
Coffee in a cup behaves like liquid in a small wave tank. While you walk, the cup receives repeated motion from your body and arm. When those nudges occur near the liquid’s natural sloshing frequency, waves can build through resonance and may reach the rim. This calculator estimates that coffee-carrying resonance with a first-mode approximation for a cylindrical cup.
The relevant rhythms are your steps and the liquid surface. When their frequencies are close, successive steps can push the coffee at similar points in its wave cycle. That repeated forcing is the condition this page treats as elevated spill risk.
Coffee cup and walking inputs to measure
- Cup Diameter (cm): the inner diameter of the cup opening. If the cup tapers, use the diameter near the liquid surface.
- Fill Depth (cm): vertical liquid depth, rather than the overall cup height. Measure from the bottom to the liquid surface.
- Walking Speed (m/s): your forward speed.
- Step Length (m): distance per step, not distance per two-step stride.
For coffee walking, cadence can also be expressed in steps per minute; divide by 60 to obtain step frequency in Hz. This calculator takes speed and step length instead, then derives the same frequency.
To estimate your step length, measure a comfortable 10-step walk and divide the distance by 10. To estimate speed, divide a measured walking distance by the time it takes; use the same relaxed or rushed pace you intend to test.
Coffee slosh resonance formulas used
The coffee spill model calculates two frequencies:
-
Step frequency (how often walking drives the cup):
Formula:
Here v is walking speed in m/s and L is step length in m, producing fw in steps per second (Hz).
-
Sloshing frequency (the first circular-cup mode):
The calculator uses g = 9.81 m/s² and k = 3.682 / D, where D is the cup diameter in meters and h is liquid depth in meters. The value 3.682 is twice the first circular-mode root because the entered measurement is diameter rather than radius.
The coffee spill score rises when fw approaches fs. The script applies a Gaussian-shaped resonance window controlled by sigma, then multiplies it by a fill factor of h / (D / 2), capped at 1.
Worked example: an 8 cm coffee mug at a normal pace
Consider a cylindrical coffee mug with an 8.0 cm inner diameter, 6.0 cm of coffee, a walking speed of 1.4 m/s, and a 0.70 m step length.
The walking frequency is fw = 1.4 / 0.70 = 2.0 Hz. With those cup dimensions, the first-mode calculation gives a sloshing frequency of about 3.38 Hz. Because the two frequencies are separated, the calculator’s Gaussian resonance term is small; the 6 cm depth already reaches the model’s capped fill factor, so the displayed risk is about 0.3%.
This example illustrates the purpose of the score: it identifies whether a particular gait frequency is close to the modeled cup frequency, rather than adding unrelated cup and walking measurements into a total.
Keeping the same mug and fill depth but changing speed to 1.1 m/s gives a step frequency of about 1.57 Hz. That moves still farther below the modeled 3.38 Hz slosh frequency, so this specific model produces an even lower score. A different cup diameter or depth can shift the sloshing frequency and change that conclusion.
How to interpret coffee spill resonance results
Coffee spill resonance results are most useful as comparisons between your own cup-and-gait scenarios, not as a promised chance that liquid will cross the rim.
- Sloshing freq: the cup’s modeled first natural frequency in Hz, determined here by its diameter and fill depth.
- Step freq: the walking frequency in Hz, calculated from speed divided by step length.
- Spill risk: a relative 0–100% resonance score that also includes the capped fill factor.
If the coffee score is high, alter one condition at a time and calculate again. A speed or step-length change shifts the forcing frequency; reducing fill depth lowers the modeled fill factor and also leaves more physical room below the rim.
As a useful check, doubling speed while holding step length constant doubles step frequency. The score may rise or fall sharply if that change crosses the cup’s sloshing frequency, while little change is expected when both walking frequencies remain far from it.
Typical coffee-cup values to try
| Scenario | Diameter (cm) | Depth (cm) | Walking Speed (m/s) | Step Length (m) |
|---|---|---|---|---|
| Office mug, half full | 8 | 6 | 1.4 | 0.7 |
| Travel tumbler, near brim | 7 | 15 | 1.2 | 0.65 |
| Large café cup, leisurely | 10 | 5 | 1.0 | 0.75 |
| Paper cup, rushing | 9 | 8 | 1.6 | 0.70 |
Coffee spill resonance limitations and assumptions
This coffee-carrying estimate simplifies a moving cup into a cylindrical, first-mode sloshing model so that cup dimensions and walking rhythm can be compared directly.
- Cup shape: it assumes a rigid cylindrical cup. Taper, a sipping opening, a lid, and internal features can alter free-surface motion.
- Walking motion: it uses steady cadence derived from speed and step length. Actual steps vary and arm motion can introduce additional forcing.
- Damping: it does not explicitly model viscosity, foam, grip absorption, or liquid contact with a lid, all of which can affect waves.
- Rim and events: it does not know rim height, sudden stops, turns, stairs, or pavement bumps, so the score is not a certified spill probability.
For hot coffee, use the result as a rhythm-comparison aid, not a safety clearance. A secure lid, steady grip, and extra care around changes in direction remain the most dependable protections.
Quick coffee-carrying strategies to reduce spills
Reducing coffee slosh is usually a matter of avoiding frequency alignment while keeping enough headroom for ordinary motion.
- Change cadence: a slightly slower or faster pace can move step frequency away from resonance.
- Adjust step length: at the same speed, shorter steps increase step frequency; check the resulting frequency rather than assuming the direction of risk.
- Lower fill depth: this reduces the model’s fill factor and leaves more room below the rim.
- Use a lid or travel mug: these can limit liquid escape and alter free-surface motion.
- Carry close to your body: a controlled grip can reduce uncontrolled arm movement.
- Pause before stairs and turns: those movements can excite slosh even if straight-line cadence is well separated from resonance.
Practical coffee-carrying notes beyond the model
Coffee often spills because of nonperiodic events: a sudden stop, door handle pull, uneven pavement, or quick pivot. Such events contain more than one frequency, so a low straight-walking resonance score cannot rule out a spill.
Conversely, real drinks may slosh less than this idealized calculation suggests because milk, foam, a narrow opening, a lid, and the hand-and-wrist system dissipate motion. The narrow question this calculator answers is whether a steady walking rhythm is close to the cup’s modeled natural rhythm.
Coffee slosh resonance questions and answers
Why can a narrower coffee cup feel easier to carry?
In this cylindrical-cup model, reducing diameter increases the wavenumber and generally raises the natural sloshing frequency. Whether that makes a particular cup easier to carry depends on whether the new frequency is farther from your own step frequency.
Does filling the coffee cup more always increase risk?
In this score, greater depth increases the fill factor only until it reaches its cap. Real spill behavior also depends on headroom, rim shape, and motion, but leaving more space below the rim is generally prudent when carrying a drink.
What if I know coffee-walking cadence but not speed?
Choose a reasonable step length and calculate speed as cadence in Hz times step length. For example, 120 steps/min is 2.0 Hz; with a 0.70 m step length, that corresponds to about 1.4 m/s.
Coffee Slosh Steady Steps (mini-game)
Try a hands-on coffee-slosh demonstration: as the walking rhythm approaches the cup’s slosh rhythm, waves grow faster. Tilt to counter the slosh and click or tap to speed up. The game uses the same first-mode sloshing-frequency relationship described above.
Accessibility note: this coffee-balancing mini-game is optional. The spill-risk calculator works without it; if you prefer reduced motion, you can skip this section.
Goal: —
Best: 0m
