Islam & Science Signs in the universe and within ourselves

Physics & Mathematics

Numbers & Mathematics

The arithmetic written into the Qur’an, 300 solar years that are 309 lunar ones, the inheritance fractions that shaped algebra, the number 19, primes, and famous number patterns, each checked against the text with calculators you can use yourself.

13 min readUpdated October 2026

How this page works

Every count below was checked against the standard Arabic text (the Tanzil Uthmani edition, Ḥafṣ reading, Kufan verse numbering: 114 surahs, 6,236 verses). The verses on this site are displayed in the IndoPak script, but script style does not change which words are present. Where a claim depends on a counting choice, we tell you the choice. The calculators let you check things yourself.

Arithmetic written into the text

The Qur’an does not only mention numbers. In several places it adds, subtracts, multiplies and compares them explicitly.

وَاَتِمُّوا الْحَجَّ وَالْعُمْرَةَ لِلّٰهِؕ فَاِنْ اُحْصِرْتُمْ فَمَا اسْتَيْسَرَ مِنَ الْهَدْيِۚ وَلَا تَحْلِقُوْا رُءُوْسَكُمْ حَتّٰي يَبْلُغَ الْهَدْيُ مَحِلَّهٗؕ فَمَنْ كَانَ مِنْكُمْ مَّرِيْضًا اَوْ بِهٖٓ اَذًي مِّنْ رَّاْسِهٖ فَفِدْيَةٌ مِّنْ صِيَامٍ اَوْ صَدَقَةٍ اَوْ نُسُكٍۚ فَاِذَا͏ٓ اَمِنْتُمْࣟ فَمَنْ تَمَتَّعَ بِالْعُمْرَةِ اِلَي الْحَجِّ فَمَا اسْتَيْسَرَ مِنَ الْهَدْيِۚ فَمَنْ لَّمْ يَجِدْ فَصِيَامُ ثَلٰثَةِ اَيَّامٍ فِي الْحَجِّ وَسَبْعَةٍ اِذَا رَجَعْتُمْؕ تِلْكَ عَشَرَةٌ كَامِلَةٌؕ ذٰلِكَ لِمَنْ لَّمْ يَكُنْ اَهْلُهٗ حَاضِرِي الْمَسْجِدِ الْحَرَامِؕ وَاتَّقُوا اللّٰهَ وَاعْلَمُوْٓا اَنَّ اللّٰهَ شَدِيْدُ الْعِقَابِࣖ ۝١٩٦

And complete Hajj (i.e. the major pilgrimage) and 'Umrah (i.e. the minor pilgrimage) for the sake of Allah; then if you are prevented (from entering Makkah, due to the fear of an enemy or sickness, etc.), so send the sacrificial animal (to the Haram of Makkah), whichever is available. And do not shave your heads until the sacrificial animal reaches its destination (i.e. slaughtered in Haram); then whoever amongst you is sick or has an ailment of the head must therefore pay a compensation by fasting, or (by giving) charity or sacrifice; then when you are at ease, so whoever takes the advantage of combining Hajj and 'Umrah, it is (binding) upon him to sacrifice whatever (animal) is available. Whoever then cannot afford (to sacrifice an animal), he should therefore fast for three days during the days of Hajj and seven (fasts) when you have returned to your homes; these are ten complete (days of fasting); this ruling is for the one who is not a resident of Makkah. And keep fearing Allah, and know that the punishment of Allah is severe.

Qur’an 2:196Sūrat Al-Baqara · The Cow

3 + 7 = 10, and the verse states the total: “these are ten complete”.

وَوٰعَدْنَا مُوْسٰي ثَلٰثِيْنَ لَيْلَةً وَّاَتْمَمْنٰهَا بِعَشْرٍ فَتَمَّ مِيْقَاتُ رَبِّهٖٓ اَرْبَعِيْنَ لَيْلَةًۚ وَقَالَ مُوْسٰي لِاَخِيْهِ هٰرُوْنَ اخْلُفْنِيْ فِيْ قَوْمِيْ وَاَصْلِحْ وَلَا تَتَّبِعْ سَبِيْلَ الْمُفْسِدِيْنَ ۝١٤٢

And We made a promise of thirty nights to Moosa and completed it by adding ten more to them; the promise of his Lord therefore amounted to forty nights, in full. And Moosa said to his brother Haaroon, 'Remain as my vicegerent upon my people, and reform (them) and follow not the way of the mischief-makers.'

Qur’an 7:142Sūrat Al-A'raaf · The Heights

30 + 10 = 40, again with the total stated.

وَلَقَدْ اَرْسَلْنَا نُوْحًا اِلٰي قَوْمِهٖ فَلَبِثَ فِيْهِمْ اَلْفَ سَنَةٍ اِلَّا خَمْسِيْنَ عَامًاؕ فَاَخَذَهُمُ الطُّوْفَانُ وَهُمْ ظٰلِمُوْنَ ۝١٤

And We indeed sent Nooh to his nation, he hence stayed with them for a thousand years, minus fifty years. So, the flood seized them, and they were unjust.

Qur’an 29:14Sūrat Al-Ankaboot · The Spider

1000 − 50 = 950: Noah’s time among his people is given as a subtraction.

مَثَلُ الَّذِيْنَ يُنْفِقُوْنَ اَمْوَالَهُمْ فِيْ سَبِيْلِ اللّٰهِ كَمَثَلِ حَبَّةٍ اَنۢ͏ْبَتَتْ سَبْعَ سَنَابِلَ فِيْ كُلِّ سُنۢ͏ْبُلَةٍ مِّاي͏ٔ͏َةُ حَبَّةٍؕ وَاللّٰهُ يُضٰعِفُ لِمَنْ يَّشَا࢜ءُؕ وَاللّٰهُ وَاسِعٌ عَلِيْمٌ ۝٢٦١

The example of those who spend their wealth in the path of Allah is similar to a grain which has sprouted seven ears (of wheat), and each ear contains a hundred grains; and Allah may increase even more than this for whomsoever He wills, and Allah is All-Encompassing, All-Knowing.

Qur’an 2:261Sūrat Al-Baqara · The Cow

7 × 100 = 700, and “Allah may increase even more than this for whomsoever He wills”: a lesson in growth by multiplication.

يٰٓاَيُّهَا النَّبِيُّ حَرِّضِ الْمُو͏ٔ͏ْمِنِيْنَ عَلَي الْقِتَالِؕ اِنْ يَّكُنْ مِّنْكُمْ عِشْرُوْنَ صٰبِرُوْنَ يَغْلِبُوْا مِاي͏ٔ͏َتَيْنِۚ وَاِنْ يَّكُنْ مِّنْكُمْ مِّاي͏ٔ͏َةٌ يَّغْلِبُوْٓا اَلْفًا مِّنَ الَّذِيْنَ كَفَرُوْا بِاَنَّهُمْ قَوْمٌ لَّا يَفْقَهُوْنَ ۝٦٥ اَلْـٔ͏ٰنَ خَفَّفَ اللّٰهُ عَنْكُمْ وَعَلِمَ اَنَّ فِيْكُمْ ضَعْفًاؕ فَاِنْ يَّكُنْ مِّنْكُمْ مِّاي͏ٔ͏َةٌ صَابِرَةٌ يَّغْلِبُوْا مِاي͏ٔ͏َتَيْنِۚ وَاِنْ يَّكُنْ مِّنْكُمْ اَلْفٌ يَّغْلِبُوْٓا اَلْفَيْنِ بِاِذْنِ اللّٰهِؕ وَاللّٰهُ مَعَ الصّٰبِرِيْنَ ۝٦٦

65O Conveyer of the unseen news (i.e. Prophet)! Motivate the believers to wage war (against the infidels involved in treachery); if there are twenty patient ones amongst you, they will overpower two hundred; and if there are a hundred amongst you, they will therefore overpower a thousand disbelievers; this is because that they (the disbelievers) have no understanding. 66So, Allah has now lightened the burden from you and He knows that you are weak; if there are hence a hundred patient ones amongst you, they shall hence overcome two hundred (this is the latter command); and if there are a thousand amongst you, they shall overcome two thousand by the command of Allah; and Allah is with the patient ones.

Qur’an 8:65–66Sūrat Al-Anfaal · The Spoils of War

These verses set a ratio and then revise it: first twenty to two hundred and a hundred to a thousand (1 : 10), then, once God “lightened the burden”, a hundred to two hundred and a thousand to two thousand (1 : 2). The ratios are stated twice with different numbers, as a mathematician would check a proportion.

Consistent with established science

“Three hundred years, and nine more”

The sleepers of the cave stayed “three hundred years, and nine more”. The difference between solar and lunar years gives exactly that.

وَلَبِثُوْا فِيْ كَهْفِهِمْ ثَلٰثَ مِاي͏ٔ͏َةٍ سِنِيْنَ وَازْدَادُوْا تِسْعًا ۝٢٥

And they stayed in their Cave for three hundred years, and nine more.

Qur’an 18:25Sūrat Al-Kahf · The Cave

Solar ↔ lunar years

Enter a number of solar years.

What the numbers say

A solar (tropical) year lasts 365.2422 days. A lunar year of twelve months lasts about 354.3671 days. So:

300 × 365.2422 ÷ 354.3671 = 309.2 lunar years

Three hundred solar years are, to the nearest whole year, three hundred and nine lunar years.

What the classical scholars said

This is not a modern discovery. Ibn Kathīr (d. 1373) wrote in his commentary: “The length of time was three hundred plus nine years in lunar years, which is three hundred years in solar years. The difference between one hundred lunar years and one hundred solar years is three years, which is why after mentioning three hundred, Allah says, ‘adding nine’.” He also records Qatādah’s different view, that the figure was a claim of the People of the Book, answered by the next verse: “Allah knows best how long they stayed”.

How close is the match?

The arithmetic is exact to the year, and classical scholars noticed it. We grade it consistent with established science. The Arabian listeners used lunar months, while their Christian and Jewish neighbours used solar calendars, and the verse gives the figure that fits both.

“He has kept count of all things”

The Qur’an describes God as having “kept count of all things”, and the Sun and Moon as moving by exact reckoning. It fixed the Moon’s stages “that you know the counting of the years, and calculation”.

This matters to anyone who does physics. In 1960 the physicist Eugene Wigner wrote a famous essay on “the unreasonable effectiveness of mathematics in the natural sciences”. Why should equations worked out on paper describe planets, atoms and light so precisely? For a believer the answer is natural. The universe is the work of a Creator who made everything with number and measure, and gave human minds the ability to discover it.

Consistent with established science

Fractions of inheritance, and the birth of algebra

The Qur’an’s inheritance verses assign exact fractions: ½, ¼, ⅛, ⅔, ⅓, ⅙. Working them out in real cases became one of the great drivers of Islamic mathematics.

يُوْصِيْكُمُ اللّٰهُ فِيْٓ اَوْلَادِكُمْࣗ لِلذَّكَرِ مِثْلُ حَظِّ الْاُنْثَيَيْنِۚ فَاِنْ كُنَّ نِسَا࢜ءً فَوْقَ اثْنَتَيْنِ فَلَهُنَّ ثُلُثَا مَا تَرَكَۚ وَاِنْ كَانَتْ وَاحِدَةً فَلَهَا النِّصْفُؕ وَلِاَبَوَيْهِ لِكُلِّ وَاحِدٍ مِّنْهُمَا السُّدُسُ مِمَّا تَرَكَ اِنْ كَانَ لَهٗ وَلَدٌۚ فَاِنْ لَّمْ يَكُنْ لَّهٗ وَلَدٌ وَّوَرِثَهٗٓ اَبَوٰهُ فَلِاُمِّهِ الثُّلُثُۚ فَاِنْ كَانَ لَهٗٓ اِخْوَةٌ فَلِاُمِّهِ السُّدُسُ مِنْۢ بَعْدِ وَصِيَّةٍ يُّوْصِيْ بِهَا͏ٓ اَوْ دَيْنٍؕ اٰبَا࢜و͏ٔ͏ُكُمْ وَاَبْنَا࢜و͏ٔ͏ُكُمْ لَا تَدْرُوْنَ اَيُّهُمْ اَقْرَبُ لَكُمْ نَفْعًاؕ فَرِيْضَةً مِّنَ اللّٰهِؕ اِنَّ اللّٰهَ كَانَ عَلِيْمًا حَكِيْمًا ۝١١

Allah commands you concerning your children (regarding their share of inheritance); the share of the son is equal to the share of two daughters; then if there are only daughters, even if more than two, for them is two-thirds of the inheritance. And if there is only one daughter, for her is one half. For each of the parents of the deceased is one sixth of the inheritance, if he has children. Then, if the deceased has no children but leaves behind parents, so one third is for the mother (and the remaining is for the father). Then, if he has several brothers and sisters, so one sixth is for the mother after any will he had made and (after) payment of debt (if owed by the deceased). Your fathers and your sons; you do not know which of them will be more useful to you. This share is fixed by Allah; indeed, Allah is All-Knowing, Most Wise.

Qur’an 4:11Sūrat An-Nisaa · The Women

From verses to al-jabr

Around 820 CE in Baghdad, Muḥammad ibn Mūsā al-Khwārizmī wrote al-Kitāb al-Mukhtaṣar fī Ḥisāb al-Jabr wa’l-Muqābala. The word “algebra” comes from its title, and “algorithm” from his name. A large part of the book is devoted to inheritance problems. Dividing estates according to the Qur’anic shares, with debts and bequests, called for systematic methods of solving equations.

When the fractions add up to more than one

Sometimes the prescribed shares exceed the whole estate. In a famous case called al-Minbariyya, the deceased leaves a wife (⅛), two daughters (⅔), a father (⅙) and a mother (⅙). Over a common denominator of 24 that is 3 + 16 + 4 + 4 = 27 parts, more than 24. ʿAlī ibn Abī Ṭālib, according to the well-known report, was asked about it while giving a sermon and answered at once: “Her eighth has become a ninth.” Every share is scaled down in proportion (al-ʿawl), so the wife receives 3/27 = 1/9. Most jurists followed this method. Ibn ʿAbbās famously disagreed.

al-Minbariyya: “her eighth became a ninth”

Top: the Qur’anic shares over 24, which add up to 27. Bottom: after proportional reduction (ʿawl) over 27.

Scholarly debate

The number nineteen

“Above it are nineteen guards.” A single verse, followed by an unusually long explanation of why God mentioned the number.

عَلَيْهَا تِسْعَةَ عَشَرَؕ ۝٣٠ وَمَا جَعَلْنَا͏ٓ اَصْحٰبَ النَّارِ اِلَّا مَلٰ࢜ىِٕكَةًࣕ وَّمَا جَعَلْنَا عِدَّتَهُمْ اِلَّا فِتْنَةً لِّلَّذِيْنَ كَفَرُوْاۙ لِيَسْتَيْقِنَ الَّذِيْنَ اُوْتُوا الْكِتٰبَ وَيَزْدَادَ الَّذِيْنَ اٰمَنُوْٓا اِيْمَانًا وَّلَا يَرْتَابَ الَّذِيْنَ اُوْتُوا الْكِتٰبَ وَالْمُو͏ٔ͏ْمِنُوْنَۙ وَلِيَقُوْلَ الَّذِيْنَ فِيْ قُلُوْبِهِمْ مَّرَضٌ وَّالْكٰفِرُوْنَ مَاذَا͏ٓ اَرَادَ اللّٰهُ بِهٰذَا مَثَلًاؕ كَذٰلِكَ يُضِلُّ اللّٰهُ مَنْ يَّشَا࢜ءُ وَيَهْدِيْ مَنْ يَّشَا࢜ءُؕ وَمَا يَعْلَمُ جُنُوْدَ رَبِّكَ اِلَّا هُوَؕ وَمَا هِيَ اِلَّا ذِكْرٰي لِلْبَشَرِࣖ ۝٣١

30Above it are nineteen guards. 31And We have not fixed the guards of Hell except angels; and We did not fix this number but to test the disbelievers, in order that the People of the Book may attain certainty, and to increase the faith of the believers, and the People of the Book and the Muslims may not have any doubt, and those in whose hearts is a disease (of hypocrisy) and the disbelievers may say, 'What does Allah mean by this astounding example?' This is how Allah causes to go astray whomever He wills and guides whomsoever He wills, and no one knows the armies of your Lord except Him, and that (i.e. Hell and its attributes, or the verses of the Qur'aan) is not but advice to mankind.

Qur’an 74:30–31Sūrat Al-Muddaththir · The Cloaked One

Facts you can verify

  • The basmala, بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ, is written with 19 letters (see below).
  • There are 114 surahs = 6 × 19.
  • The basmala occurs 114 times. It opens 113 surahs (all except Sūrat al-Tawbah, 9), and appears once more inside Sūrat al-Naml (27:30).
  • From the surah missing its basmala (9) to the surah with the extra one (27) is exactly 19 surahs, counting both. The sum of those surah numbers, 9 + 10 + … + 27, is 342 = 18 × 19.
  • The first revelation, Sūrat al-ʿAlaq (96), is the 19th surah counting from the end, and it has 19 verses.

A cautionary history

In the 1970s Rashad Khalifa used an early computer to search for 19-based patterns, and his findings spread widely. Many of his later counts relied on non-standard spellings or selective rules. He eventually claimed to be a messenger and declared two verses of the Qur’an (9:128–129) to be later additions because they did not fit his code. Scholars of every Muslim school rejected this. The lesson is clear: a numerical theory must never be allowed to overrule the preserved text.

Our assessment

The facts listed above are real and anyone can check them. Their significance is debated. 74:31 itself says the number was given as a test and to strengthen the faith of believers, and it does not describe a code. We present these as genuine curiosities, not as the proof of the Qur’an.

The nineteen letters of the basmala

As written in the muṣḥaf. The alif of al-Raḥmān is a small superscript mark, not a full letter, so it is not counted.

ب1س2م3 ا4ل5ل6ه7 ا8ل9ر10ح11م12ن13 ا14ل15ر16ح17ي18م19

Seven, nineteen, and other primes

A prime number has no divisors except 1 and itself. Two numbers that recur in the Qur’an are prime: 7 (the seven heavens, and the seven verses of al-Fātiḥah, “seven verses… which are often repeated”, 15:87) and 19. Here are the whole numbers the Qur’an mentions, with the primes highlighted:

1112:1216:51318:2249:36518:2267:5472:29869:7917:101102:1961112:4129:361974:30208:653046:15402:515029:146058:4709:808024:49938:231002:2592008:6530018:251,00097:32,0008:663,0003:1245,0003:12550,00070:4100,00037:147

An honest note: primes are common among small numbers. A quarter of the numbers below 100 are prime, and five of the first ten whole numbers above 1 (2, 3, 5, 7 and 11) are. So a prime turning up is not remarkable in itself. The total number of verses, 6,236 = 2 × 2 × 1,559, is not prime, and neither is the number of surahs, 114.

Middles and letter values

“A middle nation” in the middle

Sūrat al-Baqarah has 286 verses in the Kufan count. Verse 143, exactly half of 286, is the one that calls the Muslim community أُمَّةً وَسَطًا ummatan wasaṭan, “a middle (balanced) nation”. The arithmetic is exact. The observation depends on the Kufan verse count, since other classical counting traditions number al-Baqarah slightly differently.

Iron: 57 and 26

In the traditional abjad system every Arabic letter has a number. الحديد (al-ḥadīd, “the iron”) adds up to 57, and Sūrat al-Ḥadīd is surah 57, which is also exactly half of 114. Without the article, حديد totals 26, the atomic number of iron. A caution: iron’s most common isotope is iron-56 (about 92%). Iron-57 exists but makes up only about 2%, so claims linking “57” to iron’s isotopes are misleading.

Abjad calculator

Type Arabic. Diacritics are ignored. Conventions: ة = 5, ى = 10, ء = 1.

The basmala totals 786, the number many Muslims in South Asia write as a shorthand for it. Abjad values are a traditional convention for letters, not part of the Qur’an’s meaning. Treat these results as curiosities.

Pattern or coincidence? How to tell

The Qur’an has about 77,000 words and 320,000–330,000 letters (depending on how letters are counted). In any text that size, if you are free to choose what to count and how, you will always find “amazing” numbers. Mathematicians call this the law of truly large numbers. It is closely related to the Texas sharpshooter fallacy: fire at a barn, then paint the target around the bullet holes.

Two popular examples, checked against the text:

  • “The word month appears 12 times.” True under one rule. The singular shahr, with any attached particles, occurs exactly 12 times. If the dual shahrayn (2) and the plural ashhur (6) are included, the total is 20.
  • “The word day appears 365 times.” Depends entirely on the rule. Our count of singular forms of yawm, with prefixes and suffixes, gives 445, or 375 without yawmaʾidhin (“on that day”). Reaching exactly 365 requires a particular selection of forms.
  • “Makkah divides the globe at the golden ratio.” Makkah lies at 21.42° N. Its distance to the South Pole divided by its distance to the North Pole is 111.42 / 68.58 = 1.625, close to the golden ratio 1.618 but 0.4% off. Almost any city is “close” to some famous number.

A numerical pattern deserves attention when it uses the standard text, has counting rules fixed before looking, can be reproduced by anyone, and would be very unlikely by chance. Most viral claims fail at least one of those tests. The Qur’an’s miracle has never rested on number games. Its language, guidance and preservation are its proof, so the believer loses nothing by being strict here.