The practice of assigning numerical values to letters and words has ancient roots that stretch back to some of humanity's earliest civilizations. But when and where did gematria truly begin? What were the first documented instances of this alphanumerical system, and what were these early practitioners trying to communicate? By exploring the oldest recorded uses of gematria-like systems, we gain fascinating insights into the origins of this enduring practice that continues to captivate scholars, mystics, and linguistic enthusiasts today.

Mesopotamian Origins
Many scholars trace the earliest roots of alphanumerical systems to ancient Mesopotamia, the cradle of civilization between the Tigris and Euphrates rivers.
The Sargon II Inscription
One of the earliest documented examples of what resembles a gematria system comes from the reign of the Assyrian king Sargon II (722-705 BCE). According to surviving inscriptions, Sargon II built the wall of his city Khorsabad exactly 16,283 cubits long, specifically to match the numerical value of his name.
This remarkable archaeological finding suggests that the practice of associating names with numbers, and imbuing those numerical values with significance, was already established in the 8th century BCE. The precision with which this massive architectural project was executed—ensuring the wall's length exactly matched the king's name-number—demonstrates the importance attached to this numerical correspondence.
Babylonian Mystery Texts
Babylonian cuneiform tablets from around the same period contain what scholars call "cryptographic texts" that play with the numerical values of divine names. One famous example involves the god Marduk, whose name is represented by the number 50 in several mystical texts.
In these tablets, priests and scholars created elaborate systems where deities' names could be written either as words or as their corresponding numbers. This practice appears to have had both practical purposes (as a form of shorthand notation) and mystical significance (suggesting that the deity's essence could be expressed mathematically).
The "I Love Her Whose Number Is..." Riddles
Perhaps most intriguing are the ancient Mesopotamian love riddles that use numerical values to obscure the beloved's name. Clay tablets dating to around 700 BCE contain phrases equivalent to "I love her whose number is X," where X represents the numerical value of a woman's name.
These playful riddles suggest that by this period, alphanumerical systems had moved beyond purely religious or royal contexts and had entered the realm of popular culture and everyday use. The fact that the audience was expected to solve these numerical puzzles indicates that basic gematria-like calculations were relatively widespread knowledge among literate Mesopotamians.
Ancient Egyptian Contributions
While Egypt developed a different writing system than Mesopotamia, evidence suggests they too practiced forms of alphanumerical symbolism.
Hieroglyphic Number Symbolism
Egyptian hieroglyphs functioned in multiple ways—as phonetic sounds, ideograms, and determinatives. Certain hieroglyphs also represented specific numbers. This overlap between writing and mathematics created a fertile environment for alphanumerical symbolism.
Archaeological findings from tombs and temples show instances where words and names were apparently chosen or modified because their hieroglyphic forms contained numerically significant patterns. For example, certain royal epithets seem to have been constructed to contain numerological references to important cosmic numbers like 7 (representing completeness) or 9 (representing the Ennead, the nine primary deities).
The Book of Thoth
Fragmentary texts referring to the legendary "Book of Thoth" (the Egyptian deity of wisdom and writing) mention systems of calculating with letters. Though no complete version of this book has survived, references to it in other texts suggest it contained early forms of what we might recognize as gematria-like practices.
Later Greco-Egyptian magical papyri from the 2nd century BCE to the 5th century CE show clear evidence of alphanumerical systems, likely representing a continuation and evolution of much older Egyptian practices. These texts contain spells and invocations where the numerical values of divine names play crucial roles in the magical operations.
Early Hebrew Gematria
While the term "gematria" is most commonly associated with Jewish mystical traditions, pinpointing its earliest appearance in Hebrew texts requires careful historical investigation.
Biblical Hints
Some scholars suggest that certain numerical patterns in the Hebrew Bible (Tanakh) might indicate awareness of gematria-like principles among its authors and editors. For example, the genealogy in Genesis 5 contains what appears to be deliberately constructed numerical patterns. However, explicit examples of gematria calculations are not found in the biblical text itself.
The absence of explicit gematria in the Bible doesn't necessarily mean the practice didn't exist during biblical times. It might simply reflect that the biblical texts weren't the appropriate venue for such esoteric practices, which may have been transmitted orally or in now-lost separate documents.
The Talmudic Period
The earliest unambiguous Hebrew gematria examples appear in the Talmudic literature, compiled between approximately 200 and 500 CE. In these rabbinic discussions, gematria is explicitly mentioned as one of the hermeneutical methods for interpreting biblical texts.
One famous Talmudic example involves Genesis 14:14, which states that Abraham took 318 men to rescue his nephew Lot. The Talmud suggests this number actually refers to Abraham's servant Eliezer, whose name has the numerical value of 318 in Hebrew gematria. This interpretation implies that Abraham only took Eliezer with him, emphasizing Abraham's faith that God would help them despite their small number.
Such examples demonstrate that by the Talmudic period, gematria was a well-established interpretive technique within Jewish scholarly circles, suggesting a considerable period of prior development.
The Dead Sea Scrolls Evidence
The discovery of the Dead Sea Scrolls provided new insights into the development of Jewish alphanumerical systems. Some texts from Qumran (dating from approximately 200 BCE to 70 CE) contain what appear to be primitive gematria calculations.
For example, certain pesher (interpretive) texts from Qumran use numerical values of Hebrew letters to draw connections between different biblical passages or to reveal supposedly hidden meanings in the text. This suggests that proto-gematria techniques were being used by Jewish sects like the Essenes during the Second Temple period, significantly earlier than the compilation of the Talmud.
Greek Isopsephy
Parallel to Hebrew gematria, the ancient Greeks developed their own alphanumerical system called isopsephy.
Early Greek Examples
One of the earliest documented examples of Greek isopsephy appears in graffiti found at Pompeii, dating to before the city's destruction in 79 CE. The inscription reads: "I love the girl whose number is 545." This shows that by the 1st century CE, the practice of calculating the numerical value of names was common enough to appear in casual graffiti.
Literary sources suggest the practice may be much older. References in works by Plato and Pythagoras's followers (6th-4th centuries BCE) indicate awareness of numerical values of letters, though explicit examples of calculations are scarce in the surviving texts from this period.
The "Beast" Number 666
Perhaps the most famous ancient example of isopsephy/gematria appears in the New Testament's Book of Revelation, written in Greek around 95 CE. The text refers to "the number of the beast" as 666 and states that this is "the number of a man."
This cryptic reference is widely understood by scholars to be an example of isopsephy, where 666 represents the numerical value of a specific name—most likely "Nero Caesar" when written in Hebrew letters and calculated according to Hebrew numerical values. This example demonstrates how alphanumerical systems could be used to communicate politically dangerous messages in coded form during periods of persecution.
Cultural Exchange
The similarities between Hebrew gematria and Greek isopsephy raise questions about possible cultural exchange and influence. During the Hellenistic period (323-31 BCE), following Alexander the Great's conquests, Greek culture spread throughout the Mediterranean and Middle East, creating numerous opportunities for cross-cultural exchange of ideas.
Some scholars suggest that the systematic development of Hebrew gematria may have been influenced by Greek isopsephy during this period of intense cultural contact. Others argue that both systems evolved from earlier Mesopotamian practices, developing in parallel with occasional cross-fertilization of techniques and applications.
The Purpose of Early Gematria
What were these ancient practitioners trying to accomplish with their alphanumerical systems? The evidence suggests several distinct functions:
Royal Propaganda
In Mesopotamia, alphanumerical systems often served royal propaganda. By encoding his name in the wall of his city, Sargon II created a lasting monument to himself that operated on multiple levels—the wall protected his city physically while numerically embodying his royal identity.
Similar practices appear in other ancient kingdoms, where rulers used numerical symbolism to reinforce their divine or cosmic legitimacy. The numerical value of a king's name might be intentionally connected to astronomically significant numbers or to the numerical values of deity names, suggesting divine favor and cosmic order in the ruler's reign.
Scribal Secret Knowledge
For ancient scribes and priests, mastery of alphanumerical systems represented specialized knowledge that enhanced their status. In societies where literacy was limited to a small elite, the ability to perceive and manipulate these hidden numerical patterns in texts served as a marker of advanced education and spiritual insight.
Evidence from scribal schools in Mesopotamia suggests that learning these systems was part of advanced training, creating a kind of "secret knowledge" that distinguished fully initiated scribes from beginners. The ability to compose texts with multiple layers of meaning—literal, symbolic, and numerical—demonstrated the highest levels of scribal mastery.
Theological Exploration
In religious contexts, early gematria-like practices served theological exploration. By discovering numerical patterns in sacred texts or divine names, practitioners believed they were uncovering divinely encoded truths about the nature of reality.
For example, in certain Babylonian theological texts, the numerical relationships between different deity names were used to explain their cosmic relationships and hierarchies. Similarly, early Jewish mystical texts used the numerical values of divine names and biblical verses to explore the nature of God and creation.
Mnemonic Devices
In oral cultures where memorization played a crucial role in knowledge transmission, alphanumerical systems served as powerful mnemonic devices. By associating texts with numerical patterns, practitioners created additional memory hooks that aided in perfect recall of sacred or important texts.
This mnemonic function may explain why many ancient religious texts contain numerical patterns that seem deliberately constructed. These patterns weren't just mystical symbolism—they were practical tools that helped ensure accurate transmission of texts in an era before widespread written literacy.
Evolution into Systematic Practice
How did these early, somewhat disparate alphanumerical practices evolve into the more systematic gematria traditions we recognize today?
Standardization of Values
One crucial development was the standardization of letter values. Early systems often assigned numerical values somewhat inconsistently, but over time, fixed values became established. For Hebrew, the standard system where aleph=1, bet=2, etc., with specific letters representing 10s, 100s, and 1000s, became the norm by the Talmudic period.
This standardization allowed for more consistent calculations and interpretations, facilitating the spread of gematria practice beyond small circles of specialists to wider scholarly and mystical communities.
Integration with Interpretive Traditions
Another important development was the integration of gematria into broader interpretive frameworks. In Jewish tradition, gematria became one of several recognized methods of biblical interpretation, alongside techniques like notarikon (interpreting letters as abbreviations) and temurah (letter substitution systems).
This integration legitimized gematria as more than just a curiosity or wordplay—it became an officially recognized approach to extracting meaning from sacred texts, particularly in mystical and Kabbalistic traditions.
Written Documentation
The transition from primarily oral transmission to written documentation of gematria methods and findings represented another significant evolution. Works like the Sefer Yetzirah (Book of Formation, composed between the 2nd and 6th centuries CE) began to explicitly discuss the mystical significance of Hebrew letters and their numerical values.

Later, medieval Kabbalistic texts like the Bahir (12th century) and the Zohar (13th century) further developed and systematized gematria practices, preserving and expanding techniques that may have originated much earlier.
Conclusion: The Enduring Legacy
The search for the "first gematria code" reveals not a single invention moment but a fascinating evolution of alphanumerical practices across multiple ancient civilizations. From the walls of Khorsabad to the graffiti of Pompeii, from Babylonian clay tablets to Dead Sea scrolls, these early examples demonstrate humanity's enduring fascination with finding meaning in the numerical values of words.
What began as royal propaganda, scribal techniques, and theological exploration in ancient Mesopotamia, Egypt, Israel, and Greece eventually evolved into the more systematic practices we now recognize as gematria, isopsephy, and other alphanumerical traditions.
Perhaps most remarkably, the fundamental insight behind these ancient practices—that words and numbers can be interconverted to reveal hidden patterns and meanings—continues to resonate in contemporary contexts from biblical interpretation to modern cryptography. In this sense, those ancient scribes who first began calculating the numerical values of words have left a legacy that extends far beyond what they could have imagined, continuing to influence how we think about the relationship between language, mathematics, and meaning today.