〜のだ / んだ

Pattern
〜のだ / んだ
Level
N4
Reading
〜のだ (or 〜んだ in casual speech) is used to explain a situation, provide background information, or ask for explanations. It attaches to plain form verbs, adjectives, and noun/な-adjectives + な (e.g. 走るんだ, 綺麗なんだ). It contrasts with plain endings which are simple statements of fact, whereas 〜のだ explicitly connects the statement to context. level: N4, nuance: explanatory, expressive.
Meaning
explanatory particle (it is that..., because...)
Example

どうして遅れたんですか。バスが来なかったんです。 Why were you late? It's because the bus didn't come.

More from Grammar Points