There's no simple answer to that one. It depends on severity of storm, how fast it's moving, time of day, knowledge of local conditions, etc.
A UK thunderstorm is often part of a relatively fast moving cold front so an hour later it might be 30 miles away, whereas a tropical one in Singapore might not have moved an inch.
Also depends on what you're flying, VFR in a light single might get into trouble whereas a Boeing or a 'bus will not.
Assuming that you are VFR in a low performance light single that can't outclimb a downdraft, and you don't have any cool stuff like weather radar on board, then the best advice is stay VMC and avoid it by at least 5 or 10 miles.