Welcome

NumberDB is a collaborative database of numbers. The underlying idea is that in practise, numbers are determined by their first 10 digits. That makes them searchable. NumberDB attempts to be a tool to identify numbers, and to show known descriptions. Which numbers are stored depends on their simplicity and their relevance.
NumberDB stores numbers in tables. Tables are families of numbers together with a description. Thus a number can appear in several tables: For example, the number 1 is in the table of Integers, Values of the Gamma function, and it has its own table One as it is a special number.
Tables of numbers also contain a definition, a description of parameters, and possibly formulas, comments, references, links, programs, and further more specific information.
Furthermore tables are given tags, which helps searchability and classification.

Advanced search guide

The advanced searchbar can be used to search for:
  • Lists of real numbers
    Use Sage syntax to enter a number, a list of numbers, or a dictionary of the form {param: number}. The lists and dictionaries may be nested. The numbers might be given via formulas involving standard functions such as sin and sqrt, as well as standard constants such as e and pi.
    Examples:
  • Lists of complex numbers
    Similarly one can search for complex numbers. Recommended parents are CIF (complex interval field), CBF (complex ball field), and SR (symbolic ring), although CC (complex field via floats) should work as well unless too much precision is lost during the computation.
  • Lists of p-adic numbers
    Similarly one can search for p-adic numbers in $\mathbb{Z}_p$ and $\mathbb{Q}_p$.
    Examples:
    • Qp(2,prec=4)(5) searches for $5 + O(2^4)$ = $2^0 + 2^2 + O(2^4)$, that is, any $2$-adic integer with first four $2$-adic digits $1$, $0$, $1$, $0$.
    • {n: Qp(2)(n) for n in [1..10]} searches $1$, ..., $10$ up to $O(2^{20})$ as $2$-adic numbers; note that 20 is the standard precision for Qp in sage.
  • Lists of polynomials over $\mathbb{Q}$
    Similarly one can search for multivariate polynomials over $\mathbb{Q}$. As only expressions are accepted (mainly for safety reasons), we can define the variables as in the following example:

Number types and displayed accuracy

Numbers in NumberDB can be of the following types.
  • Integers:
    Integers are represented exactly as decimal numbers, e.g. "3" and "-1729".
  • Rational numbers:
    Rational numbers are represented exactly as fractions of integers, e.g. "-3/2".
  • Real numbers:
    Real numbers are usually hard to represent exactly. Instead we store an exactly represented interval that contains the real number. The smaller the interval, the higher the accuracy. The interval can be given in one of the following formats:
    • Decimal expansion: e.g. "3.14" represents the interval $[3.13, 3.15]$, that is, the last digit may be off by at most $1$. Scientific notation is allowed, e.g. "12e2" represents the interval $[1100, 1300]$. Note: If the decimal expansion does not contain "." or "e", it will instead denote an exactly represented integer.
    • Real interval: e.g. "[2, 2.3728596]". The end-points are exactly given.
    • Real balls: e.g. "3.14 +/- 2e-2" represents the interval $[3.12, 3.16]$. The center and radius of the real ball are exactly given.
    • NumberDB's p-notation: e.g. "1p31415" represents the interval [3.1414, 3.1416]. In general, for two integers A and B, "ApB" corresponds to the decimal expansion 0.BeA, where again the last digit of B may be off by 1. The sign of the number is determined by the sign of B.
  • $p$-adic numbers:
    $p$-adic numbers in $\mathbb{Q}_p$ are usually hard to represent exactly. Instead we store an exactly represented $p$-adic ball that contains the $p$-adic number. The smaller the radius of the ball, the higher the accuracy. The ball can be given in one of the following (equivalent) formats:
    • Rational representative: e.g. "3+1/2 + O(2^3)" represents the $2$-adic ball $2^{-1} + 2^0 + 2^1 + O(2^3)$. The rational representative might be given as an algebraic expression involving integers and the usual operations "+", "-", "*", "/", and "^".
    • $p$-adic expansion: e.g. "Q2:1.110" represents the $2$-adic ball $2^{-1} + 2^0 + 2^1 + O(2^3)$. Note: The most significant digit stands on the left. The $p$-adic digits are given as base 10 numbers with as many letters as the base 10 representation of p. E.g. "Q13:01.02" represents the $13$-adic ball $13^{-1}+2\cdot 13^0 + O(13^1)$. The decimal point is not necessary, e.g. "Q2:110" represents the $2$-adic ball $2^0 + 2^1 + O(2^3)$. Minus signs are allowed, e.g. "Q2:-110" represents the $2$-adic ball $-(2^0 + 2^1) + O(2^3)$.
These formats apply to the tables' webpages, the searchbar, as well as to the raw data in yaml format.

Numbers not found by search

Searching by number answers one question: you have a number — from an experiment, a computation, a paper — and you want to know whether it is already known, and where else it appears.

A few numbers here cannot answer that question, because nobody knows them precisely enough. The exponent of matrix multiplication is only known to lie somewhere in [2, 2.3728596], and the diagonal Ramsey number R(5,5) somewhere in [43, 48]. If searching for 2.3 returned the matrix multiplication exponent, that would not tell you that your number is that exponent — only that a wide range happens to contain your number, which is equally true of every value in it.

So such numbers are left out of search by number. They are marked in the tables with a dagger, like , and you can still find them by name or by tag — searching for “matrix multiplication” finds the exponent, and that is the useful way to ask about it.

The cutoff is a relative precision of 1e-05: a value counts as identifiable when it is known to roughly that fraction of its own size, which is about five significant digits. Relative rather than absolute, because a number near 1012 known to within 0.0001 is pinned down far more sharply than a number near 1 known to within the same amount.

The precision that counts is what is actually known about the number, not how it happens to be displayed. A value stored as an exact fraction is known perfectly however it is rounded for display, and a measured value such as 0.88153(17) is known only to the digits its error bars allow.

Python and Sage interface

NumberDB can be searched from Python, and from SageMath, with the numberdb package.
pip install numberdb

>>> import numberdb
>>> for result in numberdb.search('{n: pi^n for n in [1..5]}'):
>>>     print(result.exact_text, result.table.title)
Search queries can be any string that represents an expression as in the advanced search guide.

The same package serves Sage. Install it into Sage's Python with sage -pip install numberdb, and ask a result for .sage() to get the number as a Sage object. Sage is optional: without it you still get exact values as Python int, Fraction and interval endpoints.

Anonymous use is rate limited. See API access.

API access and rate limits

NumberDB has a small JSON API for reading and, with a key, for writing. The API reference lists every endpoint. The numberdb package is the supported way to use it; it handles the response format, the retries and the crash-safety, so you do not have to.

Anonymous use is limited to 60 requests per hour. Searching runs your expression on our machine, and NumberDB is a small volunteer project on a small server — the limit is there so that one script in a loop cannot make the site unusable for everyone else.

An API key raises the limit to 1000 requests per hour. Being logged in on the website counts as identified too. Set the key in the environment rather than in your worksheet, so a notebook you share does not carry it:

export NUMBERDB_API_KEY=...
Exceeding the limit returns HTTP 429 with a Retry-After header; the package raises numberdb.RateLimitError, carrying the same number of seconds.

Create one on your profile. A key is shown once when it is created and stored only as a hash, so nobody can look it up later — not you and not us. If you lose one, revoke it there and take another.

Keep it out of the code you publish. The package looks for it in NUMBERDB_API_KEY, then in a .env beside your script, then in ~/.config/numberdb/env — the last of which is in no project directory, so it cannot be committed by accident. The keys page shows the exact lines to paste.

A key says who you are; it does not by itself allow writing. That needs a few of your edits to have been reviewed and confirmed, which your profile shows.

If you need more than this — a bulk download, or a systematic study — please get in touch rather than working around the limit. We would rather help.

How to contribute

Contributions are possible in a number of ways:
  • Bug reports, feature requests, general discussions:
    Visit the GitHub issue page (preferred), or send an email to info@numberdb.org.
  • Typos in tables, adding references, comments, etc.:
    You may edit the table's yaml file via the Guide to editing tables below. In short: Edit the corresponding yaml-file in the numberdb-data repository. The link can be found below the title on the table's webpage.
  • Contribute new tables:
    You may contribute new tables via the Guide to creating new tables below. In short: You need to create a table.yaml in a new folder of the numberdb-data repository and submit a pull request.
  • Programming the webpage:
    The webpage is in active development. Current development goals are listed in the issues section of the GitHub repository numberdb-website.
Credits for contributions are automatically given within git and on GitHub, as every single change is stored in a permanent history. In the future, contributors to tables of numbers will be automatically displayed also on numberdb.org.

Guide to editing tables

Sign in and click edit under any table's title. You get the table's source in an editor, with a preview of how the page will look. Nothing is saved until you press Save.

  • Show preview renders your version exactly as the table page will render it, so you can see the result before committing to it.
  • Show changes lists what you have actually altered, which is the only practical way to check an edit to a table of a thousand entries.
  • Save publishes immediately.

Your change is live as soon as you save it. The entries you changed are marked as needing review and are left out of search by number until a reviewer confirms them; everything else in the table is unaffected, and the entries themselves stay visible on the page throughout. This is deliberate: a reader looking at a table can see that an entry is unconfirmed and weigh it, while somebody typing digits into the search box cannot, because a wrong fortieth digit looks exactly like a right one.

If two people edit at once, edits to different entries are combined automatically. Edits to the same entry are not guessed at: you are shown both versions and nothing is saved until you decide.

For more advanced changes, it is worth reading the format for tables. You can also try the preview page without an account, which renders any table source without saving anything.

Why not through GitHub

Existing tables are edited here and nowhere else. The data repository numberdb-data is where the corpus can be read, cited and forked, but it is a mirror of what this site holds rather than a second place to change it: a commit made there would not be visible here until the database was rebuilt, and that rebuild would discard anything edited on the site in the meantime. Two places to change the same table means whichever was written second quietly wins, so there is one.

Creating a new table is done here too; see the guide below.

Guide to creating new tables

Sign in and use new table. You are given a template with every section a table normally has, in the order they usually appear, so you can see what is expected rather than having to find an example.

A new table needs a title and at least one number. One is enough. A table with none is a draft, and a published draft holds a permanent identifier, appears in the listings and answers nothing — there is no way for a reader to tell it apart from a table somebody gave up on. So write the prose, enter one value by hand, and let a program add the rest if there are more.

The table is given a T-number when it is created, and keeps it for good. Its web address is built from the title, but the T-number is the address to quote: renaming a table deliberately does not change the first one, because every link anybody has already written points at it.

Choose the parameters carefully

An entry's identity — the thing a citation, an anchor and a search result all point at — is its parameter values. So the set of parameters and their order are fixed once the table is published: changing them afterwards would not break existing citations, it would leave them resolving successfully and pointing at different numbers, which no amount of checking can catch. Their types, constraints and display can be changed at any time, since none of those enters an identity.

When a program computes the numbers

Most tables should have code that can recompute their entries; it is the difference between a number a reader can check and one they have to take on faith. Install the numberdb package, write a generator, and send its results with an API key:

#In SageMath. The plain `import numberdb` works too, but then zeta() and
#RealIntervalField() are not there to call.
import numberdb.sage as numberdb

class Zeta(numberdb.Generator):
    table = 'T42'
    parameters = ('n',)
    type = 'R'

    def enumerate(self, limit=1000):
        for n in range(2, limit + 1):
            yield {'n': n}

    def value(self, params, digits):
        #Sage builds interval fields in BITS; numberdb counts DIGITS.
        return RealIntervalField(numberdb.bits(digits))(zeta(params['n']))

Zeta().verify()      # is the table still right?
Zeta().preview()     # is this generator right? computes all, sends nothing
Zeta().publish()     # send the entries

Writing it as a function of one entry's parameters, rather than as a script that computes everything, is what makes the other three things possible: extending the table is the same call with a larger bound, recomputing it to greater precision is a larger digits, and checking it can sample ten entries instead of regenerating a table that may take days. A check that takes seconds is a check that gets run.

Writing through the API needs a track record: a few edits that reviewers have accepted. A person editing one table exercises judgement about it; a program does not, and writes faster than anyone can read.

Format of a table

A table is written in YAML, as a set of named sections. Only Title and the entries are required; everything else is there when it has something to say.

Title: Zeros of the Riemann zeta function

Definition: >
  The imaginary parts of the nontrivial zeros of $\zeta(s)$.

Parameters:
  n:
    type: Z
    constraints: $n \geq 1$
    display: $n$

Data properties:
  type: R
  complete: no
  sources:
  - CITE{Odlyzko}

Numbers:
- params: {n: '1'}
  number: 14.134725141734693790457251983562470270784257115699243175685567460149?
  comment: the first zero
- params: {n: '2'}
  number: 21.022039638771554992628479593896902777334340524902781754629520403587?
The entries

Each entry is a record: params saying which entry it is, a number, and anything else you want to say about it. The parameters are named in every entry, which is what makes a citation stable — an identity that depended on the order they happen to appear in would still resolve after somebody reordered them, and would point at a different number.

A value is always text, never a bare decimal. YAML would read 3.14 as a floating-point number and hand back whatever the nearest one is, which is a different number from the one you wrote. The same rule is why complete: no means the word "no": YAML 1.1 would read it as false.

Real numbers are written with a ? on the end, marking the last digit as uncertain: 3.14159? is a value known to lie in that range, not a claim that it stops there. Complex numbers are written a + i * b, with the i first — an imaginary part can run to a hundred digits, and wherever a value is shown abbreviated the beginning is what a reader sees, so that is where the marker belongs. Exact values — integers, fractions, polynomials — are written out in full.

The sections
TitleRequired. Renaming a table does not change its address.
DefinitionWhat these numbers are, in a sentence or two. LaTeX is allowed anywhere prose is.
ParametersThe names, in the order the entries use them, each with a type, optional constraints and how it is displayed.
NumbersThe entries. Called Data in a few older tables; both are read.
Data propertiestype, complete, sources, reliability.
Display propertiesHow the table is laid out — number-header, group parameters.
Comments, Formulas, References, Links, Keywords, Tags, Similar tablesProse and pointers. CITE{key} refers to a reference, HREF{Table_name} to another table.
Types

Data properties: type says what the values are:

Z, Qintegers and rationals — exact, written in full
R, Creal and complex numbers, to a chosen precision
Qpp-adic numbers, carrying their precision as O(p^k)
Z[], Q[]polynomials — exact

A parameter's type may also be Symbolic, for one whose values are names rather than numbers: Co1, unit-s, a_n/n!.

How much to record

A hundred significant digits, and up to about a thousand entries, is what a typical table holds. Neither is a hard rule, and going over is fine when there is a reason — a complete family that happens to be larger, or digits that were expensive to compute. Say the reason in a Size exception line under Data properties and nothing more is asked.

A hundred digits is the suggestion because cheap digits carry no information: anybody who wants the thousandth digit of a value that evaluates in a second can compute it themselves, and a hundred is far more than enough to identify a number, which is what this database is for. Digits earn their place when they were hard to get. A table that says it is complete is never asked to justify its size, since truncating a complete table does not make it smaller, it makes it wrong.

What the site owns

The ID is not part of the document. It belongs to the table, is allocated when the table is created, and is ignored if you type one. You will see it at the top of the exported file, where it is put back so the file can be read on its own.

Unknown keys on an entry are kept and shown, so the format can carry something new without waiting for anybody to permit it — that is how proof, url and both signs came to exist. A key that is nearly a known one, like numbr, is refused instead, because a misspelt number is not a note about the entry, it is a value that would silently vanish.

Frequently asked questions

  • Why do I need to specify the period in the real number search?
    Because the period is even more significant than the highest digit. In principle, one could implement a search of real numbers by their first few digits without the knowledge of the period; however this would ask for numbers up to powers of 10, which does not seem natural enough in general. We implemented a search by the fractional part, as it does not depend on the base.

Licence

The data in NumberDB is licensed under CC BY-SA 4.0. Use it, cite it, build on it — credit NumberDB with a link to numberdb.org or to the table you used, and share what you build on the same terms.

If a use of yours cannot meet the ShareAlike condition — a textbook whose publisher cannot relicense the whole book, or a dataset that must be CC0 to be accepted elsewhere — write to info@numberdb.org. We would rather arrange something than refuse.

Contributions are covered by the Contributor's Licence Agreement. You keep the copyright in what you write, it is published under CC BY-SA 4.0, and you are credited above.

The software is separate: the website is GPL-3.0-or-later, and the numberdb package is MIT.

Some content comes from elsewhere and keeps its own terms. Sequence names from the On-Line Encyclopedia of Integer Sequences are © the OEIS Foundation Inc., licensed CC BY-SA 4.0. Values drawn from Wikipedia are numerical facts, which carry no copyright, and are stored with a link to the article they came from.

List of contributors

Contributor Number of table edits
Benjamin Matschke 282
zeta3[bot] 95
Eran Assaf 3
Alex J Best 1

Acknowledgements

NumberDB is build and runs on various open-source projects, in particular: Django, PostgreSQL, SageMath, Pari/GP, arb, nginx, Gunicorn, Pyro5, git. NumberDB's repositories are stored on GitHub.

Parts of NumberDB's code and documentation were written with the help of AI coding assistants — in particular Claude Code and Codex CLI, and the language models behind them — always under human review. Responsibility for the code, and for the mathematics, rests with the developers.

NumberDB's server is funded by the main developer Benjamin Matschke, who in turn is supported by Boston University and Simons Foundation grant #550023.