For me, I've always taken the line that if the temperature wont come down with paracetemol/nurofen, then that's when I'd worry.
DD is prone to high temperatures generally. For her 40 degrees is not terribly terribly uncommon when she has a bad cold or flu. If I can get the temp down, then I carry on with the dosing, while noting how she is in other respects - i.e. colour, pain?, rashes and so on.
With ds1 and ds2 they are much less prone to high temps. DS2 in particular has a normal resting temp that is significantly lower than dd's day to day one. He had a temp of 40 a couple of weeks ago, along with diarrhoea. I rang ooh doctors about that one and was advised to give the max doses of calpol and nurofen, and to make sure that the temp came down. It did, but seemed to take longer than I was used to, which was why I panicked. He's 15 months now.
Anyway - what I'm saying is that I agree with the previous poster who says it's about the whole child rather than the basic temp reading that points to whether an illness needs prompt medical attention. So for example dd has obviously got some flu-y thing that's going round. Has had temp of more than 38 on and off for nearly 3 days. But is gradually becoming more off than on IYSWIM - she's recovering. But apart from being hot and having usual cold/flu symptoms she's actually OK - can be distracted, not in any particular pain, taking fluids, no rashes and so on. So haven't sought medical attention (yet).