A half is a third of it. What is it?
2026 Update: The Half-Full Glass — Estimation and Fermi Problems
The classic “is the glass half full or half empty?” can be modeled mathematically and connects to Fermi estimation — a key skill in system design interviews at Google, Jane Street, and quant firms.
def glass_measurement(fill_fraction: float, optimistic: bool = True) -> str:
"""
Model the half-full/half-empty perspective mathematically.
A glass is 'half full' from an optimistic perspective (gaining),
'half empty' from a pessimistic perspective (losing).
"""
if fill_fraction > 0.5:
return f"More than half: {fill_fraction:.1%} full"
elif fill_fraction float:
"""
Estimate molecules in volume_ml of water.
Water density: 1 g/ml
Molar mass of H2O: 18 g/mol
Avogadro's number: 6.022e23 molecules/mol
"""
water_mass_g = volume_ml # Since density = 1 g/ml
moles = water_mass_g / 18
avogadro = 6.022e23
molecules = moles * avogadro
return molecules
molecules = water_molecules_in_glass(125) # Half a 250ml glass
print(f"Molecules in half-full glass: {molecules:.3e}") # ~4.18e24
# Fermi estimation framework for tech interviews
def estimate_daily_youtube_uploads() -> dict:
"""
Fermi estimate: How many hours of video are uploaded to YouTube daily?
Fact-check: YouTube says 500 hours/minute = 720,000 hours/day.
"""
global_internet_users = 5e9
youtube_users_fraction = 0.5 # ~50% of internet users use YouTube
daily_active_users = global_internet_users * youtube_users_fraction * 0.3 # 30% daily active
fraction_who_upload = 0.001 # 0.1% upload content
avg_upload_per_uploader_minutes = 5
hours_per_day = (daily_active_users * fraction_who_upload *
avg_upload_per_uploader_minutes) / 60
return {
"estimated_hours_per_day": hours_per_day,
"actual_hours_per_day": 720_000,
"order_of_magnitude_error": abs(
round(hours_per_day / 720_000 if hours_per_day > 720_000
else 720_000 / hours_per_day)
)
}
result = estimate_daily_youtube_uploads()
for k, v in result.items():
print(f" {k}: {v:,.0f}")
Fermi estimation in tech interviews:
- “How many requests per second does Google Search handle?” (~8.5B queries/day ≈ 100K/sec)
- “How much storage does Gmail need for 2 billion users?” (avg email ~75KB × 50 emails/day × 365 × 2B users)
- “How many servers does Netflix need?” (decompose by: users, concurrent streams, bitrate, cache hit rate)
The skill is structured decomposition: identify the key variables, make explicit estimates for each with sanity checks, and combine. An answer within 1-2 orders of magnitude is considered excellent.