Devarim16:15

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

Seven days you shall keep the festival to the Eternal your Almighty in the place that the Eternal will choose, for the Eternal your Almighty will bless you in all your yield and in all the work of your hands, and you shall be altogether joyful.

Devarim 16:15

שִׁבְעַת יָמִים תָּחֹג

Devarim / Deuteronomy 16:15 · Pshat

Devarim 16:15

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

Seven days you shall keep the festival to the Eternal your Almighty in the place that the Eternal will choose, for the Eternal your Almighty will bless you in all your yield and in all the work of your hands, and you shall be altogether joyful.

Pshat פְּשָׁט

Only joy

The harvest is in, the barns are full, and at last one can breathe out. The Torah commands seven days of festival and promises: you will be altogether joyful.

Chizkuni: on Pesach and Shavuot you are busy with the harvest, so the festival is one day. But on the festival of Booths (Sukkot) everything is already gathered in the house, you have nothing to tend, so celebrate seven days. Sforno: He will bless you with a great harvest, and the poor will have many gifts. Be only joyful, and let no sadness mix into the joy. Rashi: by the plain sense this is not a command but a promise. Ibn Ezra: "only" means it will not be otherwise.

How Chizkuni, Sforno, Rashi, and Ibn Ezra explain it

Chizkuni Seven days you shall keep the festival

Because on Pesach you were busy with the barley harvest and on Shavuot with the wheat harvest, I did not trouble you with more than one day. But on the festival of Booths (Sukkot), when everything is already inside and you have nothing to be busy with, you must keep the festival seven days.

Another explanation: because you have much to spend, you have gathered all into the house and separated the second tithe — seven days keep the festival, which is not so on Pesach and Shavuot.

Another explanation: because each and every day is a festival in itself, since it differs in its offerings.

Sforno For He will bless you

So that you will have a great ingathering, and for the poor there will be many gifts.

Sforno And you shall be altogether joyful

Be only joyful, and let no sadness mix into your joy.

Rashi And you shall be altogether joyful

By its plain sense this is not the language of command but the language of promise. And by its Talmudic reading they learned from here to include the night of the last festival day in the joy.

Ibn Ezra And you shall be altogether joyful

It is a commandment to rejoice on the festival of Booths. And some say: "for He will bless you" in the future, and you will be joyful for ever.

Ibn Ezra And the sense of "only"

That it will not be otherwise.

Takeaway

The second tithe (מַעֲשֵׂר שֵׁנִי) is the part of the harvest that the owner himself eats in Jerusalem (Devarim / Deuteronomy 14:22–26). Chizkuni: by Sukkot it has already been set aside, and there is something to celebrate with.
"The night of the last day" is the night of Shemini Atzeret, the eighth day after the seven days of Sukkot. The sages derive joy on this night from the word "only" (Sukkah 48a).
Onkelos translates "and you shall be altogether joyful" as "and you shall be joyful indeed": so he renders the word אַךְ.