Love Calculator
Enter two names and calculate a fun compatibility score from 0-100% with hearts and visual display.
Maintained by Aygul Dovletova
For entertainment purposes only. Results are deterministic based on name combination.
How to Use the Love Calculator
- Fill the "Your Name" field with the first person’s name. The field accepts up to 40 characters and ignores leading/trailing whitespace.
- Fill the "Their Name" field with the second person’s name. Nicknames work, but remember: changing "Alex" to "Alexander" gives a different result because the hash input changes.
- Press Calculate Love (or hit Enter from either input). A short 800 ms animation plays while a big heart pulses, then the score appears.
- Read the output: a number between 0 and 100 in a color-coded heart (red above 75, orange 50-75, yellow 25-50, grey below), a progress bar filled to the same percentage, and a short message tied to the score bucket.
- Try variations by swapping names, adding a middle name, or toggling capitalization (case is ignored, so "ALEX" and "alex" give the same result).
What’s Actually Happening Under the Hood
This is pure novelty software - there is no serious compatibility science anywhere in it. When you click Calculate, the tool lowercases both names, strips whitespace, joins them with an ampersand, and runs the result through a classic Java-style String.hashCode() loop: hash = ((hash << 5) - hash) + char, iterated over every character, forced into a 32-bit signed integer with a bitwise AND. The absolute value is then taken modulo 101 to land in the 0-100 range.
That is a deterministic hash, not a random number generator. The exact same pair of names produces the exact same score every time, on every device, forever. It also means tiny changes cascade wildly: "Alex" and "Alexander" paired with the same second name can easily land 50 points apart because the hash is chaotic with respect to input length. There is no connection to astrology, numerology, personality profiling, or any study of human relationships. Calling it a "calculator" is generous - it is a function from two strings to one integer.
Reasons People Actually Open This Page
- Breaking the ice at a party or on a first date when you’ve run out of small talk.
- Filler content for a birthday card or wedding toast that wants one extra visual gag.
- A harmless TikTok/Reels hook: record the cracking animation, caption it, move on.
- Showing a kid how text can be turned into numbers by a computer, as a very gentle intro to hashing.
- Comparing scores across several couple-pairings for a group chat running an impromptu "tournament".
- Generating a consistent, shareable "seed" for two names that you can screenshot and tease friends with later.
Things That Trip People Up
The most common complaint is "I got 3% with my spouse and 91% with my ex" - that is a feature of the hash, not a verdict. A single character flip can move the result by 80 points because hash avalanche is designed to spread input bits across the output. Order matters too: "Alex + Jordan" does not hash to the same value as "Jordan + Alex", because the concatenation is directional. Emoji and non-Latin characters are accepted but encoded via their UTF-16 code units, so "Алéx" will score differently from the ASCII-only "Alex". Empty strings and whitespace-only inputs are rejected by a pre-check. The 40-character input cap exists so that very long novels-as-names don’t crowd the UI, not because the hash would fail. And because results are deterministic, there is no "shuffle" button: clicking Calculate twice with the same pair of names returns the same number, every time.
Hash Functions 101
A hash function takes any input and produces a fixed-size output that looks random but is fully reproducible. The variant here is a simplified form of Daniel Bernstein’s djb2 / Java’s String.hashCode(): a rolling accumulator multiplied by 31 (here expressed as (hash << 5) - hash) with each character’s code added in. It is not a cryptographic hash - there is no SHA-256, no salt, no PBKDF2, no preimage resistance. It is trivial to find two different name pairs that produce the same score (modulo 101 means at most 101 buckets, so collisions are guaranteed by the pigeonhole principle after 102 distinct inputs). That is fine for a novelty widget: the goal is a cheap, stable, visually spread integer, not security. Real cryptographic hashes show up elsewhere on the site, for instance in the SHA-256 tool.
Compared to Other Love-Quiz Sites
Most "love calculator" sites on the first page of Google work exactly the same way under the hood: a cheap string hash or a seeded pseudo-random generator mapped to a 0-100 range. A few dress it up with an AJAX call to their server so they can show ads in the meantime; the math is identical, the latency is just worse. Actual compatibility research (Gottman Institute surveys, Big Five personality overlap scoring, attachment-style questionnaires) requires dozens of questions and trained interpretation, not two text fields. If you genuinely want to think about a relationship, a quiz like the Gottman Sound Relationship House self-assessment or a structured date-night conversation guide is orders of magnitude more useful than any one-click score. This tool wins on one axis only: it finishes in under a second and costs nothing.
Frequently Asked Questions
Is this actually a real compatibility test?
No, not in any meaningful sense. It is a deterministic string hash mapped to 0-100 for entertainment. There is no psychology, astrology, numerology, or relationship science involved. Treat it as a dice roll that happens to always roll the same number for the same inputs, not as advice about your actual partner.
Why do I get the same score every time with the same names?
Because the underlying function is a hash, not a random generator. The formula is fixed (a Java-style <code>hashCode</code> of the concatenated, lowercased names modulo 101), so given identical inputs the output is bit-for-bit identical every run. If you want a fresh number, change an input - add a middle name, use a nickname, or swap the order.
Does the order of names matter?
Yes. The tool joins the two names with an ampersand before hashing, so "Alex" + "Jordan" produces a different intermediate string than "Jordan" + "Alex", and therefore a different hash and usually a different score. If you’re curious which is "higher", try both orders - people often do this as a tiebreaker joke.
Are the names uploaded anywhere?
No. The entire calculation happens in a Preact component running inside your browser tab. There is no <code>fetch</code> call, no analytics event carrying the names, and nothing written to <code>localStorage</code>. Once you close the tab the inputs are gone from memory. You could disconnect your Wi-Fi after the page loads and the button would keep working.
What happens if I enter non-Latin characters or emoji?
They’re accepted and hashed via their UTF-16 code units (that’s what <code>charCodeAt</code> returns in JavaScript). So "🧡" or "Éloïse" will produce a stable score, but surrogate pairs (like many emoji) count as two code units each, which can make the score distribution feel a little lumpier for emoji-heavy names.
Why do tiny changes give wildly different scores?
The multiply-and-shift structure of the hash is designed to spread input bits across the whole 32-bit output - a property called the avalanche effect. That is exactly what you want from a hash function, but it means "Alex" vs "Alexander" can easily land 40-80 points apart. It is not a bug; it is the hash working as intended.
Can two different name pairs give the same score?
Absolutely, and they must. The output space is 101 buckets (0 through 100). The input space is effectively unlimited. By the pigeonhole principle, collisions are guaranteed - in fact you hit the first guaranteed collision at 102 distinct inputs. For a novelty widget this doesn’t matter, but it is why nobody uses <code>hashCode()</code> for serious work.
Why is there a short calculating animation?
Pure UX. The hash itself runs in microseconds, but an instant answer feels suspicious - like the tool didn’t "think". An 800 ms <code>setTimeout</code> with a pulsing heart signals that something is happening and lets the result land with a small dramatic beat. The delay is cosmetic and can be removed by modifying the component.
Is the color of the heart meaningful?
It is just a mapping from the score to a palette: red above 75, orange from 50 to 75, yellow from 25 to 50, grey below 25. This makes it easy to tell "green lights" from "red flags" at a glance. The same color thresholds drive the progress-bar fill so the visuals stay consistent.
Should I base a relationship decision on this?
Please do not. If you’re seriously evaluating a relationship, look at structured tools with decades of research behind them: the Gottman Sound Relationship House, attachment-style inventories, or the Relationship Assessment Scale. A one-click novelty score from a hash function tells you nothing about communication patterns, shared values, conflict style, or life goals.
More Fun & Utility
Aesthetic Text Generator
Transform text into vaporwave, upside down, small caps, bold, italic, strikethrough, bubble, and square Unicode styles.
Open toolASCII Art Generator
Convert text to large block-letter ASCII art. Supports A-Z, 0-9, and basic punctuation.
Open toolCoin Flipper
Flip a virtual coin with animation. Track heads/tails counts, percentages, and streaks.
Open toolColor Blindness Simulator
Simulate how colors appear with protanopia, deuteranopia, tritanopia, and achromatopsia using color transformation matrices.
Open toolDecision Wheel
Add custom options and spin a colorful wheel to make random decisions. Animated CSS wheel with smooth deceleration.
Open toolDice Roller
Roll D4, D6, D8, D10, D12, or D20 dice. Choose quantity, see individual results and totals with roll history.
Open tool