Embedded question (interrogative word) + かは + [noun] + によって違う
Embedded yes/no question + かは + [noun] + によって違う
Variants of the ending
The structure ~かは~によって違う expresses that something differs or changes depending on a certain factor. It translates to "whether/what/how ~ depends on ~" or "~ differs depending on ~."
The first part uses an embedded question (using question words like なん何, どう, いくら, どのくらい, or the yes/no question marker か) to indicate the thing that varies, while the second part introduced by によって indicates the factor that causes the variation.
The embedded question can use any interrogative word:
Instead of ちがう違う, you may also see ことなる異なる (a more formal synonym) or かわる変わる (to change). The meaning remains the same.
The topic marker は after か is important – it marks the embedded question as the topic and sets up the "depends on" structure. Dropping it changes the nuance and can sound unnatural in this pattern.