> For the complete documentation index, see [llms.txt](https://www.outrank.io/outrank/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.outrank.io/outrank/dfinity-grant/icp-onchain-rarity-calculator.md).

# ICP Onchain Rarity Calculator

OutRank has developed a fully on-chain calculator. Users can input a canister address, and our code fetches data directly from the canister. Additionally, they have the option to input raw data for calculations, allowing users to test data that is not on a canister. This approach is more dynamic, efficient, and flexible compared to simply storing collection data on the IC, from which it would then be pulled.

<figure><img src="/files/CH3ASO2llkISgcnzJpFM" alt=""><figcaption></figcaption></figure>

The output includes Rarity Score, Rarity Score - Trait Normalized, Rarity Rank, Trait Cramer's V, and Trait Independence data.

Please visit the online calculator at: <https://w4ulz-kiaaa-aaaap-qbsma-cai.icp0.io/?#>

We have created open-source repositories that provide access to the mathematical functions and the Rarity calculator code. Find the GitHub repository here: <https://github.com/OutRankNFT/ICP-RarityCalculator>

Please be aware that some IC NFT collections may have incomplete or incorrect data. To verify whether your metadata is formatted correctly, refer to our article on metadata formatting.\ <br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.outrank.io/outrank/dfinity-grant/icp-onchain-rarity-calculator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
