If alliances are different?
Minimum three hours. More if weather is dodgy anywhere en route.
For same alliances, I'd say minimum 90 minutes although I have done T3 to T5 at LHR, coming in from Singapore, going through UK Immigration as a non-EU, and security, in 45 minutes. Even had time for a shower in the BA lounge. Wouldn't bet on it though.
Tomorrow this mad lad is going LAD-MAD-LHR-ABZ and attempting to change terminals and airlines in MAD (Iberia -> BA) in 1 hr 35min. Wish me luck.