[noun] + の + おかげで/おかげだ
[verb (plain form)] + おかげで/おかげだ
[i-adj (plain form)] + おかげで/おかげだ
[na-adj] + な + おかげで/おかげだ
Note: Primarily used for positive results (gratitude). Can be used sarcastically/ironically for negative results (≈ せいで).
おかげで is used to express that something positive happened thanks to or owing to a certain cause. It attributes a favorable result to a person, thing, or circumstance. The word おかげ literally means "blessing" or "grace," so it carries a sense of gratitude.
The most common usage is to express appreciation for a good outcome caused by someone or something.
おかげで connects to different word types as follows:
When おかげで appears at the end of a sentence or modifies a noun, it takes the form おかげだ or おかげの.
おかげで can also be used sarcastically to blame someone or something for a negative outcome. In this case, the speaker is ironically "thanking" the cause for an undesirable result.
When expressing a genuinely negative cause without sarcasm, せいで (because of – with negative connotation) is more appropriate. Compare:
The polite set phrase おかげさまで is used in conversation to humbly acknowledge someone's help or kindness, often as a response to questions about one's well-being or progress.