The Holy One, blessed be He, said to him: "You said, 'Whereby shall I know?' (Genesis 15:8). By your life, twice it is written 'you shall surely know' (Genesis 15:13)." Rabbi Elazar ben Azariah says: But Israel dwelt in Egypt only two hundred and ten years. Know that this is so: come and see -- when Joseph went down to Egypt he was seventeen years old, and when he stood before Pharaoh he was thirty; the seven years of plenty and two years of famine make thirty-nine. Levi was six years older than Joseph, so at his descent to Egypt he was forty-five, and the years of his life in Egypt were ninety-two, making all of them one hundred thirty-seven: "and the years of the life of Levi were a hundred and thirty-seven years" (Exodus 6:16). And at his descent to Egypt his wife bore him Jochebed his daughter, and at one hundred thirty she bore Moses, and Moses was eighty years old when he stood before Pharaoh -- behold, two hundred and ten years. Yet here Scripture says "and they shall serve them, and they shall afflict them, four hundred years" (Genesis 15:13). Rabbi Elazar ben Arakh said to him: The Holy One, blessed be He, said it to Abraham our father only from the time he had offspring, as it is said, "that your seed shall be a stranger" (Genesis 15:13); and from the birth of Isaac until Israel went out of Egypt was four hundred years. He said to him: But is it not written, "and the sojourning of the children of Israel..." (Exodus 12:40)? He said to him: Two hundred and ten years Israel dwelt in Egypt, and five years before Jacob went down to Egypt Joseph had two tribes born to him, Manasseh and Ephraim -- behold two hundred and fifteen years, days and nights, making four hundred and thirty years over which the Holy One, blessed be He, leaped past the appointed end by the merit of the patriarchs, who are the everlasting mountains, and by the merit of the children of Jacob, who are the everlasting hills, as it is said, "the voice of my beloved, behold, here he comes" (Song of Songs 2:8).
Counting the Four Hundred Years of the Egyptian Exile
Yalkut Shimoni on Torah 77:12
אָמַר לֵיהּ הַקָּדוֹשׁ בָּרוּךְ הוּא אַתָּה אָמַרְתָּ בַּמָּה אֵדַע, חַיֶּיךָ שְׁנֵי פְּעָמִים יָדֹעַ תֵּדַע רַבִּי אֶלְעָזָר בֶּן עֲזַרְיָה אוֹמֵר, וַהֲלֹא לֹא יָשְׁבוּ יִשְׂרָאֵל בְּמִצְרַיִם אֶלָּא מָאתַיִם וְעֶשֶׂר שָׁנִים, תֵּדַע שֶׁהוּא כֵּן, בֹּא וּרְאֵה כְּשֶׁיָּרַד יוֹסֵף לְמִצְרַיִם הָיָה בֶּן שְׁבַע עֶשְׂרֵה שָׁנָה, וּבְעָמְדוֹ לִפְנֵי פַּרְעֹה הָיָה בֶּן שְׁלֹשִׁים, וְשֶׁבַע שְׁנֵי הַשֹּׂבַע, וּשְׁתֵּי שְׁנֵי הָרָעָב, הֲרֵי שְׁלֹשִׁים וְתֵשַׁע, וְלֵוִי הָיָה גָּדוֹל מִיּוֹסֵף שֵׁשׁ שָׁנִים וּבִירִידָתוֹ לְמִצְרַיִם הָיָה בֶּן אַרְבָּעִים וְחָמֵשׁ וּשְׁנֵי חַיָּיו בְּמִצְרַיִם תִּשְׁעִים וּשְׁתַּיִם שָׁנָה, הֲרֵי כֻּלָּם מֵאָה שְׁלֹשִים וְשֶׁבַע שָׁנָה, "וּשְׁנֵי חַיֵּי לֵוִי שֶׁבַע וּשְׁלֹשִים וּמְאַת שָׁנָה", וּבִירִידָתוֹ לְמִצְרַיִם יָלְדָה לוֹ אִשְׁתּוֹ יוֹכֶבֶד בִּתּוֹ, וּבַת מֵאָה וּשְׁלֹשִים יָלְדָה אֶת מֹשֶׁה וּמֹשֶׁה בֶּן שְׁמוֹנִים שָׁנָה בְּעָמְדוֹ לִפְנֵי פַּרְעֹה הֲרֵי מָאתַיִם וְעֶשֶׂר שָׁנִים וְכַאן הוּא אוֹמֵר וַעֲבָדוּם וְעִנּוּ אוֹתָם אַרְבַּע מֵאוֹת שָׁנָה. אָמַר לוֹ רַבִּי אֶלְעָזָר בֶּן עֲרָךְ, לֹא אָמַר לוֹ הַקָּדוֹשׁ בָּרוּךְ הוּא לְאָבִינוּ אַבְרָהָם אֶלָּא מִשֶּׁהָיָה לוֹ זֶרַע, שֶׁנֶּאֱמַר, כִּי גֵּר יִהְיֶה זַרְעֲךָ ומִשֶּׁנּוֹלַד יִצְחָק עַד שֶׁיָּצְאוּ יִשְׂרָאֵל מִמִּצְרַיִם אַרְבַּע מֵאוֹת שָׁנָה אָמַר לוֹ, וְהָכְתִיב (שמות יב, מ) "וּמוֹשַׁב בְּנֵי יִשְׂרָאֵל וְגוֹ' אָמַר לוֹ, מָאתַיִם וְעֶשֶׂר שָׁנִים יָשְׁבוּ יִשְׂרָאֵל בְּמִצְרַיִם, וְחָמֵשׁ שָׁנִים עַד שֶׁלֹּא יָרַד יַעֲקֹב לְמִצְרַיִם נוֹלַד לְיוֹסֵף שְׁנֵי שְׁבָטִים מְנַשֶּׁה וְאֶפְרַיִם, הֲרֵי מָאתַיִם וַחֲמֵשׁ עֶשְׂרֵה שָׁנָה, יָמִים וְלֵילוֹת, הֲרֵי אַרְבַּע מֵאוֹת וּשְׁלֹשִׁים שָׁנָה שֶׁדִּלֵּג הַקָּדוֹשׁ בָּרוּךְ הוּא עַל הַקֵּץ בִּזְכוּת אָבוֹת שֶׁהֵן הָרֵי עוֹלָם, וּבִזְכוּת בְּנֵי יַעֲקֹב שֶׁהֵן גִּבְעוֹת עוֹלָם, שֶׁנֶּאֱמַר, "קוֹל דּוֹדִי הִנֵּה זֶה בָּא וְגוֹ'".