Mahāṣoḍaśī mantra is formulated like this.

First line:  om - śrīṁ - hrīṁ - klīṁ - aiṁ - sauḥ (ॐ श्रीं ह्रीं क्लीं ऐं सौः)

Place śrī bīja, then place māyā bīja, then kāma bīja, then vāgbhava bīja and finally parā bīja. Thus the first line of this mantra is formed.

There is a common doubt whether to include ॐ in the beginning or not. Any mantra should start with ॐ. Kulārṇava Tantra (XV.57) says that not beginning a mantra without ॐ causes impurity of birth. Further, Chāndogya Upaniṣad begins by saying “om iti etat akṣaram udgītham upāsīta ॐ इति एतत् अक्षरम् उद्गीथम् उपासीत”. This means “this ॐ is closest to Brahman and recite this syllable as part of your worship”. And above all, the three Vedas begin with ॐ. Going by the interpretation of Chāndogya Upaniṣad, ॐ at the beginning refers to Brahman. Māṇḍūkya Upaniṣad (1) also says that ॐ is both the cause and the effect. Therefore, ॐ should be prefixed to mahāṣoḍaśī mantra, without which the mantra becomes ineffective. Further reasoning is given while discussing sauḥ*.

Next to ॐ is śrīṁ (श्रीं), which is known as śrī bīja or Lakṣmī bīja. This is the most important bīja of mahāṣoḍaśī mantra, as by adding this bīja, the fifteen lettered Pañcadaśī becomes sixteen lettered Ṣoḍaśī mantra.  Bīja śrīṁ is capable of providing auspiciousness. It promotes positive attitude and positive growth in the mind of the aspirant. This bīja is the root cause for faith, devotion, love and ultimate surrender unto Her. First, one has to have to faith in divinity. This faith later transforms into devotion. When the devotion is strong, it turns into Love for Her. This love alone makes the aspirant to surrender unto Her. As śrī bīja is the cause for surrender unto Her, it leads the aspirant to liberation. Śrīṁ comprises of three letters śa + ra + ī + nāda + bindu (dot) (श + र + ई and बिन्दु), where śa refers to Mahālakṣmī (Goddess of wealth), ra refers to wealth; ra bīja is also known as agni bīja and is capable of offering supernatural powers. Nāda is Consciousness about to manifest as the universe. It also means subtle sound. This can be best explained by ṁ. There is no other way to explain this. It is like humming nasal sound. The sound made after closing both the lips is nāda. Without nāda, bindu cannot be effective as bindu cannot be pronounced separately. Nādabindu refers to the union of Śiva and Śakti, where Nāda means Śakti and bindu means Śiva.  The dot (bindu) above this bīja removes sorrows and negative energies in the mind of the aspirant.   Based on this fact, it is said that Ṣoḍaśī mantra is capable of offering liberation or mokṣa. It is also said, “Ṣoḍaśī mantra kevalaṁ mokṣa sādhanam”, which means that Ṣoḍaśī mantra offers only liberation, which is the ultimate goal of everyone. Since liberation is not attainable that easily, Ṣoḍaśī mantra is said to be highly secretive in nature.

Next to श्रीं is hrīṁ ह्रीं, which is also known as māyā bīja. This is the combination of three letters ha + ra + ī and nāda and bindu (ह + र + ई + nāda + bindu. Ha refers to Divine Light of Śiva which also encompasses prāṇa and ākāśā, two important principles without which we cannot exist. The second component of hrīṁ is ra (र) which is also known as agni bīja. To the properties of ha, now the properties of ra are added. Properties of ra are fire (the fire that is needed for our sustenance), dharma (Agni is known for dharma) and of course agni, itself.  It is said that when sun sets, it hands over its fire to Agni and takes it back when the sun rises again next day. Thus Agni also becomes a sustainer, like the sun. Śiva is also known as Prakāśa, the original divine Light. Third of part of hrīṁ is ī which focuses the aspirants energy and motivate him to pursue the path of dharma. Nāda refers to Universal Mother (the one who reflects the Light of Śiva to the world and She is also known as Vimarśa, meaning reflection, intelligence, etc) and the bindu (dot) is the dispeller of sorrow, which actually means dispelling innate ignorance, the reason for our sorrows.

Hrīṁ ह्रीं is also known as Bhuvaneśvarī bīja. Bhuvana means the earth and Īśvarī means the ruler. She is known as Bhuvaneśvarī because, She rules the earth. Ha means Śiva and ra means Prakṛti (which can be explained as Nature or original substance. Lalitā Sahasranāma 397 is Mūlaprakṛtiḥ, which is explained here). Ī means Mahāmāya, the Divine Power of illusion. Nāda means Śrī Mātā, the Universal Mother.  The dot, known as bindu is the dispeller of sorrows. Therefore, hrīṁ can also be explained thus: Śiva (ha) and Śakti (ra) unite to cause creation (nāda) making a person afflicted with illusion. This illusion can be removed by both of them, if an aspirant contemplates them and this removal ignorance is done through bindu or dot.

Next to hrīṁ ह्रीं is klīṁ क्लीं, which is known as kāma bīja. This bīja draws divine energy towards the aspirant. It acts like a magnet. This bīja is known as power of attraction. Kāma here does not mean lust, but means the desire to get into the state of Bliss (one among the four puruṣārtha-s. Four puruṣārtha-s are dharma, artha, kāma and mokṣa). It completes the process of desire to attain Her. Attaining Her and entering into the state of Bliss go together. It increases the level of devotion. This bīja has got three parts – ka + la + am. Ka refers to desire to achieve Her Grace, la refers to contentment in one’s life, which reduces our desires and attachments and am gives happiness and joy. There are interpretations that ka also refers to Lord Kṛṣṇa. It is the bīja through which Śiva shows His Love for Her.

In the above three bīja-s, kāmakalā īṁ (ईं) is hidden. Kāmakalā can be explained through the innermost triangle of Śrī Cakra around the bindu (the innermost dot in Śrī Cakra). This dot represents Mahākāmeśvara-Mahākāmeśvari who are identical in all respects. They are seated in this dot, known as bindu. From the bindu, because of their union, creation takes place, resulting in the innermost triangle. The three sides represent Prakāśa (Light of Śiva), Vimarśa (diffusion of the Light of Śiva done by Śakti) and third side of the triangle represents “I am” and “this” (aham and idam). Thus, because of kāmakalā, these bīja-s become capable of creation.

Next to क्लीं is aiṁ ऐं, which is known as vāgbhava bīja. It is the bīja of Sarasvati, Goddess of Knowledge.  It has two parts ai + ṁ. ṁ also acts as the dispeller of sorrow. This bīja also represents one’s Guru, who is the dispeller of ignorance and as a result of this bīja, one attains the highest spiritual knowledge. It also adds motivation, will power and dedication to the aspirant. This bīja is the cause for spiritual intellect (buddhi). Mainly intellect refers to the highest level of spiritual knowledge. It directly takes an aspirant to the concerned deity by increasing his level of awareness (consciousness).

Next to ऐं is sauḥ सौः, known as parā bīja. This is also known as hṛdayabīja or amṛtabīja. Śiva explains to Śakti about this in Parā-trīśikā-vivāraṇa (verses 9 and 10), a Trika Scripture. He says to Her, “O! Gracious one! It is the third Brahman (sat or sa स) united with the fourteenth vowel औ (au – out of the sixteen vowels), well joined with that which comes at the end of the lord of vowels (visarga or : - two dots one above the other, used in the sixteenth vowel अः - aḥ). Therefore sauḥ is formed out of the combination of sa स + au औ+ ḥ = sauḥ सौः. In Parā-trīśikā-vivāraṇa (verse 26), it is again said, “He, who knows this mantra in its essence, becomes competent for initiation, leading to liberation without any sacrificial rites.” This is known as nirvāṇa dīkṣā or initiation for final liberation, where nirvāṇa means emancipation.  The Scripture proceeds to say that the one who elucidates the proper meaning of this bīja is known as Śiva Himself. This bīja is the Cosmic pulsation of the Lord.

The third Brahman referred here (sat) is explained in Bhagavad Gītā (XVII.23 - 26) “ॐ, tat and sat are the threefold representation of Brahman and from That alone Vedas, Vedic scholars and sacrificial rites have originated. Hence, during the acts of sacrifices, gifts, austerities approved by Scriptures and during Vedic recitations, ॐ is uttered in the beginning*. tat is recited by those who aim for liberation while performing sacrificial rites, austerities and charities without intent on the fruits of these actions. Sat is recited by those who perform the above acts with faith and on behalf of the Brahman.”

Thus sa स (sat) referred in this bīja is Śiva Himself, which represents His creative aspect, the pure Consciousness. Next comes His three energies Icchāśakti, Jñānaśakti and Kriyāśakti. During Creation, Cit Śakti of Śiva, after manifesting as Ānanda Śakti (Bliss) becomes the above referred three Śakti-s, before entering into the sphere of Māyā. Ānanda Śakti is known as Śakti, normally referred as Śiva’s Consort or His Svātantraya Śakti, His exclusive and unique Power of Autonomy. These three powers can be explained as subject I; object That; and subject-object or I and That. These powers of Śiva are also known as Sadāśiva, Iśvara and Suddha Vidyā. Now the fusion between S and AU takes place and सौ (sau) is formed. As a result of this fusion, creation happens, which is represented by visarga (two dots one above the other like the punctuation mark colon :) This is the Spanda or throb or pulsation of the Divine towards creation, causing the emission of His three energies contained in AU. With the addition of visarga (ḥ :) at the end of सौ (sau) becomes सौः (sauḥ). This parābīja is not meant for recitation or repetition but for the contemplation of Śiva, who alone is capable of offering liberation by removing all differentiations caused by māyā. The one who fully understands the significance of सौः (sauḥ) becomes instantly liberated.

Thus these five bīja-s form the first line of Mahāṣoḍaśī mantra.

Second line of Mahāṣoḍaśī mantra is formed thus; after these five bīja-s (in the first line), place praṇava, māyā bīja and śrī bīja and the second line appears like this:

om - hrīṁ - śrīṁ: ॐ – ह्रीं – श्रीं.

ॐ used at the beginning of the mantra refers to the Supreme Self, known as Brahman. The second ॐ placed here represents the individual soul. Thus, this ॐ is to be replaced with ātmabīja, which is given by one’s guru either at the time of initiation or earlier. Everyone will have ātmabīja, which is derived based on several factors. Ātmabīja is discussed here. In case one’s guru has not given any ātmabīja to an aspirant, he can continue to use ॐ as his ātmabīja. The three bīja-s used here refers to three stages. ॐ is apara stage or the individual soul. Hrīṁ represents the union of Śiva and Śakti and is known as parāpara (the stage of cause and effect). The last bīja śrīṁ is the stage of para, the Supreme energy, the state of Supreme Paramaśiva, where Śakti stands merged with Śiva and in this stage, She cannot be identified as a separate entity. For attaining liberation, one has to merge into Paramaśiva. In other words, individual soul (ॐ), transcend māyā, which is represented by hrīṁ, where both Śiva and Śakti are present as separate energies. The aspirant through sādhana (practice) goes past māyā, represented by bīja hrīṁ to merge with the Supreme Self, represented by the third bīja śrīṁ. Only in the second line of mahāṣoḍaśī mantra, liberation is explicitly declared.

Third, fourth and fifth lines are Pañcadaśī mantra (15 bīja-s) and Pañcadaśī mantra is explained here.

In sixth and last line the bīja-s of the first line are placed in a reverse order. This is known as mantra sampuṭīkaraṇa. This means that three bīja-s of the second line and Pañcadaśī mantra are encased by the first line and the last line, so that effects of Pañcadaśī mantra and the bīja-s of the second line do not go out of the aspirant and is sealed within the aspirant.

Mahāṣoḍaśī mantra thus formed is like this.

1. Om - śrīṁ - hrīṁ - klīṁ - aiṁ - sauḥ:  ॐ श्रीं ह्रीं क्लीं ऐं सौः (5 bīja-s, ॐ omitted)

2. om - hrīṁ - śrīṁ ॐ ह्रीं श्रीं (3 bīja-s)

3. ka – e - ī – la- hrīṁ क ए ई ल ह्रीं (5 bīja-s)

4. ha - sa – ka – ha - la - hrīṁ ह स क ह ल ह्रीं (6 bīja-s)

5. sa – ka - la - hrīṁ स क ल ह्रीं (4 bīja-s)

6. sauḥ - aiṁ - klīṁ -  hrīṁ - śrīṁ सौः ऐं क्लीं ह्रीं श्रीं (5 bīja-s)

Thus Mahāṣoḍaśī has twenty eight bīja-s, excluding the first praṇava.

Further reading:

Lalitā Sahasranāma 587

Mahāṣoḍaśī mantra

Mahāṣoḍaśī mantra japa