17:15

וַיֹּאמֶר אֱלֹהִים אֶל־אַבְרָהָם שָׂרַי אִשְׁתְּךָ לֹא־תִקְרָא אֶת־שְׁמָהּ שָׂרָי כִּי שָׂרָה שְׁמָהּ׃

And the Almighty said to Avraham: "Sarai your wife, do not call her name Sarai, for Sarah is her name.

Bereshit 17:15

וַיֹּאמֶר אֱלֹהִים אֶל־אַבְרָהָם

Bereshit / Genesis 17:15 · Remez

Bereshit 17:15

וַיֹּאמֶר אֱלֹהִים אֶל־אַבְרָהָם שָׂרַי אִשְׁתְּךָ לֹא־תִקְרָא אֶת־שְׁמָהּ שָׂרָי כִּי שָׂרָה שְׁמָהּ׃

And the Almighty said to Avraham: "Sarai your wife, do not call her name Sarai, for Sarah is her name.

Remez רֶמֶז

Ten is five and five

In Hebrew the name changes by one letter: the yud (י) at the end of "Sarai" (שָׂרַי) goes, and a hei (ה) comes: "Sarah" (שָׂרָה). The numerical value of yud is 10, of hei 5. Where did the other five go?

Lekach Tov: the yud was split in half: half to Sarah, half to Avraham. And the yud itself took its place at the start of the name Yehoshua. Kli Yakar: a final yud is a masculine ending, a hei a feminine one. Barren Sarah receives the letter of birth, and Avraham also receives a hei, so that the yud's number is not lost.

How Midrash Lekach Tov and Kli Yakar explain it

Midrash Lekach Tov

"And the Almighty said to Avraham: Sarai your wife, do not call her name Sarai, for Sarah is her name." Rabbi Yehoshua ben Korcha said: the yud that the Holy One, blessed is He, took from the name "Sarai" was divided: half to Sarah, half to Avraham. Rabbi Mana said: before, she was a princess for her own people, now for all who come into the world. And the yud taken from the name "Sarai" merited to stand at the start of the name Yehoshua, as it is written: "and Moshe called Hoshea son of Nun Yehoshua" (Bamidbar / Numbers 13:16).

Kli Yakar Do not call her name Sarai

For a final yud (י) marks the masculine. We find this ending with men: "and the princes (וְשָׂרַי) of Yissachar" (Shoftim / Judges 5:15). This is because she was barren, like men who do not give birth. And now she is given a hei (ה) instead of the yud, for a final hei marks the feminine: from now on she will be a woman who gives birth. And so that the yud should not complain that half its number was removed from the Torah, a hei was added to Avraham as well, to make him ruler over a multitude of nations and over the five chief limbs. And according to the masters of Kabbalah the hei holds the power of birth, as it says: "here (הֵא) is seed for you" (47:23), and as it says: "am I in the place of the Almighty" (30:2) and so on. Hence the two hei letters in the name Bilhah (בִּלְהָה). Therefore two hei letters were given here: one to Avraham and one to Sarah. And the yud was taken from Sarah for Avraham to show that her merit brought them this offspring, as it says: "and I too shall be built up through her" (30:3), in the merit of her bringing her rival into her house. So Sarah's merit enabled Avraham to have a child. Another explanation: they were given a hei because with the letter hei the Eternal created the world, "He did not create it empty, He formed it to be inhabited" (Yeshayahu / Isaiah 45:18). So the hei will be the cause of their offspring, for the settling of the world. And perhaps "and I will make your name great" (12:2), with an extra hei, hints that He would add a hei to his name, and for that reason "and I will make you a great nation".

Takeaway

Avram (אַבְרָם) became Avraham (אַבְרָהָם) a few verses earlier (17:5). Avraham's hei and Sarah's hei together make 10, like the yud that left the name "Sarai".
Yehoshua was first called Hoshea (הוֹשֵׁעַ). Moshe added a yud at the start, and it became Yehoshua (יְהוֹשֻׁעַ) (Bamidbar / Numbers 13:16). Rashi there explains: "may the Eternal save you from the scheme of the spies".
Kli Yakar cites "and I will make your name great" (12:2): the word וַאֲגַדְּלָה has an extra hei at the end. He sees in it a hint of the hei later added to Avram's name.