Positive commandment · Mitzvat Aseh #54 of 613
To rejoice on the festivals
לשמוח ברגלים
The verse · Devarim 16:14
וְשָׂמַחְתָּ בְּחַגֶּךָ אַתָּה וּבִנְךָ וּבִתֶּךָ וְעַבְדְּךָ וַאֲמָתֶךָ וְהַלֵּוִי וְהַגֵּר וְהַיָּתוֹם וְהָאַלְמָנָה אֲשֶׁר בִּשְׁעָרֶיךָ
“and thou shalt rejoice in thy feast, thou, and thy son, and thy daughter, and thy manservant, and thy maidservant, and the Levite, the stranger, and the fatherless, and the widow, that are within thy gates.”
The Rambam’s words
To rejoice on the festivals, as [Deuteronomy 16:14] states: "And you shall rejoice on your festivals."
לשמוח ברגלים, שנאמר: "וְשָׂמַחְתָּ בְּחַגֶּךָ" (דברים טז, יד).
Why · Sefer HaChinuch #488
Rejoice on the festivals
“It is from the roots of the commandment [that it is] because man is designed in [such] a way that his nature requires rejoicing occasionally, [just] like it requires nourishment in any case, and rest and sleep.”
Who & when
“And this commandment is practiced regarding the joy — but not regarding the sacrifice — in every place and at all times by males and females.”
Where in the Mishneh Torah
Hilchot Festival Offering הלכות חגיגה