How Your Birthday Scent Is Calculated: 24 Solar Terms, 24 Fragrances
A short walkthrough of the algorithm that picks one of 24 fragrance profiles for your birthday — what the math does, what’s hand-curated, and why I used the Chinese solar terms instead of months.
The Birthday Scent tool on this site is a small thing: enter a date, get back a scent profile with three notes, a fragrance family, and a few personality traits. This post walks through how it actually works under the hood. I’ll skip the source code and stick to the logic, but the whole site is static HTML, so if you want to read the actual implementation you can open scent.html in your browser and view source.
A 60-second refresher on solar terms
The Chinese 24 solar terms (二十四节气) are an old way of slicing the solar year into 24 markers, roughly two weeks apart. Each term is tied to something concrete in nature — the first frost, the rains coming, the awakening of insects, the longest day, the first dew on grass. The system has been used in China for about 2,200 years for farming, food, and feast days, and it’s still printed on Chinese calendars today. UNESCO added it to the intangible cultural heritage list in 2016.
For our purposes, the relevant property is this: solar terms track the actual position of the sun, not Western month boundaries. Every term starts at approximately the same Western calendar date each year, with about one day of drift. That makes them a fine-grained, stable way to slice the year — 24 buckets of 14–16 days each. The system was inscribed on the UNESCO Representative List of the Intangible Cultural Heritage of Humanity in 2016, which is the cleanest single citation if you want to read more.
The algorithm in three steps
The whole thing is three steps. None of them is complicated, and you can follow along without seeing any code.
Step 1: Convert your birthday to a “day-of-year”
The site uses a fixed 366-day calendar (treating February as if it always has 29 days). Then your birthday becomes a single number from 1 to 366. For March 8, that number is 31 (January) + 29 (February) + 8 = 68. For October 24, it’s 297. That’s the whole conversion.
Using a fixed February of 29 keeps the math year-independent. The trade-off: in non-leap years, dates after February 28 are computed as one day later than the “real” day-of-year. The shift is small enough that it almost never moves a birthday across a term boundary, and it keeps everything internally consistent.
Step 2: Find which solar term bucket you fall into
The site keeps a small lookup table — each of the 24 terms paired with its fixed start date. The first few entries look like this:
- 1·06 — Minor Cold (小寒)
- 1·20 — Major Cold (大寒)
- 2·04 — Start of Spring (立春)
- 2·19 — Rain Water (雨水)
- 3·06 — Awakening of Insects (惊蛰)
- 3·21 — Spring Equinox (春分)
- … 17 more …
- 12·22 — Winter Solstice (冬至)
To find which bucket a birthday lands in, we convert each term’s start date into a day-of-year too, then look for the largest start-day that’s still on or before your birthday. That’s your term. The only quirk is the wrap-around at the year boundary: anyone born between January 1–5 falls into Winter Solstice (the previous year’s last term), since that’s the most recent term that has already started by their birthday.
That’s the entire bucket logic. No astronomy library, no leap-year branching, no API calls.
Step 3: Look up the matching scent profile
Once we know which of the 24 buckets you fall into, the rest is a lookup. Each of the 24 profiles is a small object with the same shape:
- A name — e.g., “Thunder Rain & Black Tea”
- The solar term it’s tied to — e.g., Awakening of Insects (惊蛰)
- A fragrance family — e.g., Spicy · Electric
- Three notes — one top, one heart, one base (e.g., Black Pepper / Lapsang Souchong / Charred Oak)
- Four personality traits — e.g., Electrifying, Bold, Awakening, Complex
- A short reading and one piece of advice — written for that term
So the whole pipeline is: birthday in → day-of-year → solar-term index → profile out. Three steps, deterministic from end to end.
A worked example: March 8
Let’s run my own birthday through it.
- Day-of-year for March 8: 31 (Jan) + 29 (Feb) + 8 = 68.
- Term boundaries near March:
- Rain Water (雨水) starts Feb 19 → day-of-year 50
- Awakening of Insects (惊蛰) starts Mar 6 → day-of-year 65
- Spring Equinox (春分) starts Mar 21 → day-of-year 80
- Day 68 falls between 65 and 80, so March 8 lands in 惊蛰 (Awakening of Insects).
- Index 4 in SCENTS → “Thunder Rain & Black Tea,” with Black Pepper as the top note, Lapsang Souchong tea as the heart, and Charred Oak as the base.
That’s the whole thing. Same date in, same scent out, every time.
Why top, heart, and base notes?
The three-layer structure is borrowed from how perfume is actually built. In real perfumery, the layers are defined by how fast the molecules evaporate:
- Top notes — light, volatile molecules. You smell them in the first 5–15 minutes after spraying. Citrus, herbs, mint, ozone, pepper.
- Heart notes — slower-evaporating, the “core” of the fragrance. They emerge after 15–30 minutes and stay for an hour or two. Florals, spices, fruits, tea.
- Base notes — heavy, slow molecules. They linger 2–8 hours. Wood, musk, amber, vanilla, leather.
The site borrows the structure as a metaphor for personality:
- Top note = first impression. The thing people pick up on in the first conversation.
- Heart note = personality. The you that emerges once you settle in.
- Base note = lasting essence. What people remember years later.
It’s a metaphor, not a measurement. But it gives the profile some shape beyond a single label.
Why solar terms instead of months
Two reasons.
First, solar terms track what’s actually happening outside. Late June feels different from early June even though both fall under “summer.” The air is wetter, the days are longer, the bugs are louder. The solar terms catch that. 夏至 (Summer Solstice, around June 21) and 小暑 (Minor Heat, around July 7) have different vibes, and the scents reflect that — Sun-Warmed Skin for the first, Night Jasmine for the second.
Second, solar terms give 24 buckets instead of 12. Two weeks is a finer grain than a month, and 24 distinct fragrance profiles is more interesting than 12. It also gives the system enough room to differentiate similar-feeling seasons — deep winter (Major Cold, Sandalwood & Smoke) reads differently from late winter (Start of Spring, Plum Blossom).
What’s deterministic vs hand-curated
Two layers, doing different things.
Deterministic — the math part. Two people with the same birthday will always land in the same solar term bucket and get the same scent. Same date in, same output, every time. There’s no randomness anywhere in the function.
Hand-curated — the scent profiles. Picking “Thunder Rain & Black Tea” as the scent for 惊蛰 is editorial. I had to think about what 惊蛰 actually feels like — the first spring storms waking everything up, the smell of rain on warm earth, the energy in the air just before lightning — and translate that into a fragrance brief: Black Pepper top, smoky tea heart, charred oak base.
The 24 profiles took longer to write than the algorithm did to code. Each one needed a name that read well in four languages, a recognizable family, three actual perfumery notes that smell like the term, and four personality traits that didn’t feel generic.
A few honest edge cases
- Born Jan 1–5? You wrap into 冬至 (Winter Solstice), the previous year’s last term. The algorithm handles this with a special case in step 2.
- Born on or near a term boundary? The actual term boundaries shift by ±1 day from year to year, depending on the sun’s position. The site uses fixed start dates as a stable approximation. If you were born in a year where the boundary fell on the other side of your date, your “real” term might be one over. I picked stability over astronomical exactness because “your scent changes year to year” would be confusing.
- Leap years? The fixed 29-day February means non-leap-year dates after February 28 are computed one day later than reality. In every test case I ran, this never moved a birthday across a term boundary, but the simplification is real.
Why this approach
I wanted scent on this site to feel like a real perfumer’s brief, not a personality quiz with random emojis. The solar terms are a well-defined, hand-shaped way of slicing the year that gives the system a real structure. The note structure — top, heart, base — is borrowed straight from how perfume is actually made. The lookup is small enough that you can read it in fifteen minutes.
If you’ve found your scent and you’d like to actually use it, I wrote a separate post on that: How to Use Your Birthday Scent. It covers picking a perfume, layering at home, and using your profile for gift-giving.
— Want to keep reading? Try how the birthday color algorithm picks one of 64 hues for a similar walkthrough on the color side, or What Are the Five Elements? for another part of the system.