also: んだ
expression
explanatory/emphatic sentence-ending expression
Adds explanatory, emphatic, or reasoning nuance to a statement. Often used when providing a reason, clarifying a situation, or asserting a fact. The の/ん adds emphasis. In questions, it seeks an explanation. Equivalent to のです in more formal contexts.
See also: のです
どうして遅れたんですか。
Why were you late? (seeking explanation)
お腹が痛いんです。
My stomach hurts (explanatory tone).
彼は学生なんだ。
He is a student (asserting a fact).