Subjects and objects
In 'Who called you?', who is doing the calling, so it is the subject. In 'Whom did you call?', you are doing the calling and whom receives it, so it is the object.
The substitution trick
Turn the question into a statement. 'Who/whom did you invite?' becomes 'You invited him', so whom is correct. 'Who/whom is coming?' becomes 'He is coming', so who is correct.
Clauses
In 'The man who lives next door', who is the subject of lives. In 'The man whom I met', whom is the object of met. Many writers would simply say 'the man I met', omitting the pronoun.
Usage today
Whom is becoming rarer in casual English, and using it in conversation can sound formal. It remains expected in formal writing, especially after prepositions.
Sources & further reading
Usage notes reflect standard English. Photograph: original AI-generated illustration (Adobe Firefly). Reference organisations do not endorse this website.



