I'm surprised this this question hasn't been asked before (or at least I couldn't find it). If you're listening to a piece, and it suddenly modulates, how can you tell? and how can you determine the interval between the two tonics?
Although I have a good enough ear for recognizing scale degrees, I often can't tell if a modulation has happened, let alone guess the new key. The only scenario where I succeed is when the same melody note is sustained throughout the key change. For example, the fifth is sustained, but later is starts to sound like the tonic, this way I can tell that the new tonic is the fifth of the previous key.
What is the recommended approach? Is there a method that doesn't rely too much on theory? For example, if you can identify secondary dominants or some common patterns used for modulation you may be able to figure it out, but you wouldn't be relying completely on your ears. Can it be done without 'doing the math'?