“786” is the total value of the letters of “Bismillah al-Rahman al-Rahim”. In Arabic there are two methods of arranging letters. One method is the most common method known as the alphabetical method. Here we begin with Alif, ba, ta, tha etc. The other method is known as the Abjad method or ordinal method. In this method each letter in Arabic is assigned a numeral /an arithmetic value to it from one to one thousand. It is bism illāh ir-raḥmān ir-raḥīm written using Abjad numerals. In this case we the following a letter-by-letter cumulative value:
2 + 60 + 40 + 1 + 30 + 30 + 5 + 1 + 30 + 200 + 8 + 40 + 50 + 1 + 30 + 200 + 8 + 10 + 40 = 786
You can think of Abjad as a kind of hashing function. The value 786 is the hash value of Basmala.
The letters are arranged in the following order: Abjad, Hawwaz, Hutti, Kalaman, Sa’fas, Qarshat, Sakhaz, Zazagh. This arrangement was done, most probably in the 3rd century of Hijrah during the ‘Abbasid period, following other Semitic languages such as Phoenician, Aramaic, Hebrew, Syriac, Chaldean etc.
If you take the numeric values of all the letters of the Basmalah, according to the Abjad order, the total will be 786. In the Indian subcontinent the Abjad numerals became quite popular. Some people, mostly in India and Pakistan, use 786 as a substitute for Bismillah. They write this number to avoid writing the name of Allah or the Qur’anic ayah on ordinary papers.
A recent fatwa that states that 786 is just a number which means nothing in Islam and one cannot relate it to anything Islamic. It is neither listed in the Quran nor in Hadith. The evidence of these numbers is not being found anywhere in the Islamic history. Since it is clearly not in Quran, also this tradition is not from the time of Prophet pbuh or his Sahabah.
As Prophet pbuh taught us the clear way of living and made everything clearer for people to understand, He did not create any kind of mystery by giving us any kind of Puzzle. So there is not the reality of 786 in Islam. It developed much later, perhaps during the later ‘Abbasid period. We do not know of any reputable Imams or Jurists who used this number instead of the Bismillah.
So whoever is writing 786 instead of Bismillah and trying to make people think that it is Bismillah or relating these digits with Islamic stuff such as the number of angels or the characters in Bismillah, is just a Biddat and nothing else. It is nothing but a myth that never existed because many Muslims are doing such things which can put their lives in trouble when they face their God on the day of judgment.