So how is NFT rarity calculated? Across most collections it follows one chain: measure how common each trait is, weight the rarer traits more heavily, combine those weights into a single score, then rank every token by that score. This is a general overview, not a project-specific formula. For the wider question of why some collections earn their rarity by design while others inherit it from market noise, see structural rarity versus hype-driven rarity.

Most generative collections are built the same way. Every token is a set of traits drawn from fixed categories. A profile-picture project might define a background, a body, eyes, and an accessory. Rarity is just a measurement of how unusual one token's combination is, read against the whole supply.

How trait frequency and trait weighting work

Rarity begins with counting. For each trait value, you measure how often it appears across the full collection. Say a project holds 10,000 tokens and 500 share the same background. That background sits on five percent of the set.

The principle behind trait weighting is plain. A trait that shows up rarely carries more weight than one that shows up everywhere. A background found on five percent of tokens counts for more than one found on forty percent. Common traits add little. Scarce traits add a lot.

One detail trips people up. Frequency is measured per trait value, not per category. The category "background" is not rare or common on its own. A specific background colour is. So a single background slot can still hold dozens of values, each with its own frequency and its own weight.

That is the input step. Before any score exists, every trait value already has a frequency, and that frequency decides how much weight it carries.

How a rarity score is built and ranked

The most common rarity score formula turns each frequency into a number, then adds them up. For a single trait, the score is one divided by that trait's frequency. A trait on five percent of tokens scores 1 / 0.05, or 20. A trait on forty percent scores 1 / 0.40, or 2.5. The rarer the trait, the bigger the number.

A token's total rarity score is the sum of the scores of all its traits. Adding the scores keeps rare traits influential instead of averaging them away, which is why it became the default across rarity tools (MoonPay). It is not the only method. Some tools rank by a token's single rarest trait. Others use statistical models that account for how traits combine. Still, the additive score is the one most readers meet first.

NFT rarity ranking is the last step. Once every token has a score, you sort the collection from highest to lowest. The highest score ranks number one, the rarest in the set. Each token lands at a position, usually written as a rank out of the total supply.

That ranking is what most marketplaces and rarity sites show. It folds a token's whole trait set into one comparable position.

A few practical wrinkles sit on top. Some tools add a trait-count factor, treating tokens with unusually few or unusually many traits as rarer in their own right. Others normalise the scores so no single trait can run away with the result. These tweaks change the exact numbers. The underlying logic holds. Rarer inputs raise the score, and the score sets the rank.

Why methods differ, and where structural rarity fits

The same token can rank differently depending on which tool you check. Each platform may use a different formula, weight categories differently, or refresh its data on a different schedule. For a long time there was no single official method, so rankings drifted. That gap is part of why standardised approaches like OpenRarity were introduced (OpenSea). Read the method, not just the number.

There is a deeper variable underneath all of this. In most collections, trait frequencies come from a random mint. The art is assembled by chance, so the rarity is an accident of distribution that nobody decided in advance. The frequencies only settle once minting ends, and a token's rank can shift while the supply is still being drawn.

A few projects work the other way. They fix rarity by structure. The qualities that make a token rare are defined ahead of time, so the result does not ride on mint luck. The categories that count, and how much each one counts, are set before a single token exists. Rarity becomes a property of the design, not a side effect of who minted what.

Trash Relics is one such example. Its rarity is fixed by structure rather than mint chance, built from a defined set of structural categories instead of a random draw. The full model, including how those categories combine, is documented on the Rarity Architecture page. This guide stays general and does not reproduce that model.

For most collections, then, the answer runs along one chain. Count trait frequency, weight the rarer traits more, sum those weights into a score, and rank the collection by score. For a model where rarity is fixed by structure instead of mint chance, see the Rarity Architecture page. For the wider split between earned and inflated rarity, read structural rarity versus hype-driven rarity. The number is only as good as the method behind it.