Bloom Filter Calculator
Enter the expected number of items and a target false positive rate, or a bit budget, to get the bit array size and number of hash functions, and try a live demo filter.
- Free
- No sign-up
- Works on any device
About Bloom Filter Calculator
A Bloom filter tells you that an item is definitely not in a set or is possibly in it, using a small bit array and k hash functions. Enter the number of items you expect and the false positive rate you can accept, or a fixed number of bits. The calculator gives the bit array size m = -n ln(p) / (ln 2)^2, the best number of hash functions k = (m/n) ln 2 and the memory. Example: 1,000 items at 1 percent need 9,586 bits (1.17 KiB) and 7 hash functions. A live demo filter lets you add and test words.
How to use Bloom Filter Calculator
- Choose whether you start from a false positive rate or from a number of bits, and enter the expected number of items.
- Enter the rate or the bits, or leave the number of hash functions empty to use the best value.
- Read the size, memory and real error rate, then add and test words in the demo filter to watch bits being set.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
Can a Bloom filter give a wrong answer?
Only in one direction. If it says an item is absent, that is certain. If it says present, there is a small chance, the false positive rate, that the item was never added.
Why not use more hash functions?
Beyond the best value k, each extra hash fills the array faster and raises the error rate, and it costs more time. The best k balances the two.
Can I remove an item from a Bloom filter?
Not in the basic form, because clearing a bit may delete other items. Counting Bloom filters or cuckoo filters support removal at the cost of more memory.
Is Bloom Filter Calculator free?
Yes. Bloom Filter Calculator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.