Just for a bit of variety, I'm going to suggest the sentence IS grammatical.
I'm not as expert in the exact parsing of sentences as other people here, however it appears to me that the sentence passes all the basic tests of grammar. The most important test is 'can it be easily and unambiguously comprehended by anybody'. I believe the answer is undoubtedly 'yes'.
As a native speaker, would I use those exact words? Perhaps not. My 'gut feeling', is that I would have said 'How much longer ...', but that seems very idiomatic to me, and less logical and clear when analysed than the sentence you actually used. The question refers to quantities of time, so why not actually say so?
That's an admittedly messy answer, but I think one has to accept that good written English is not always a matter black and white rules.
The difference is that 'by' refers to an event that happens at a moment in time, whereas 'until' refers to an event that happens for a period of time. They can't usually be used as alternatives of each other - except perhaps when used with negation.
Using your second example, to say "He should have been here by now" means that at some point in time, prior to this moment, he should have come here. To say "He should have been here until now" would mean that from some earlier time, continuing to this moment, the person should have stayed here.
To reply to your 3rd comment to whatever's answer, no, you cannot substitute by for until in all those examples. As mentioned, it doesn't mean the same thing, but in those cases it makes nonsensical sentences.
In the examples of: She won’t be back (by) 5 o’clock. - She won’t be back (until) five o’clock, they almost mean the same and can be substituted. This is the negation I was referring to. Technically, "She won’t be back (until) five o’clock" could mean that she will turn up at five o'clock on the dot, whereas "She won’t be back (by) 5 o’clock" means that time she will come back will be after 5 o'clock.
Edit for comments:
...whenever we have a negative sentence (negation conditions), (always) "by" and "until" work and mean the same?
Not always, and they're not exactly the same.
...She won’t be back (until) five o’clock
This means she won't be back before 5:00. Generally this means she will get back at 5:00 or some short time after.
I've watched 3 movies (until) now vs I've watched 3 movies (by) now
Either of these will work depending on context, but neither are really natural. If you were discussing the total number of movies you've ever seen, you might say: 'I'm going to a 5-movie marathon tonight. I've only watched 3 movies until now.' Alternatively, if you were explaining how long something took by comparison you could use the second example: Where has taken you so long? You were only supposed to be going to the snackbar for popcorn. I've watched 3 movies by now.' But in the first instance you are more likely to say 'I've only ever watched 3 movies' and in the second instance 'I've watched 3 movie since then'.
With 4) the inconsistency you see is because of the negation. "She won't be back by 5.00". At that point in time she won't be here. But after that point in time, for a continuous period she will be here. Similarly, "she won't be back until 5.00" says for the period of time from now til 5.00 she won't be here. After 5.00 (i.e., from that point in time) there is a likelihood that she will be here.
I think the negation trick is the only way to use them as alternatives to each other. I can best show this by example. Given the situation of a boss asking two employees about their previous workday. Firstly, positive:
"I was there by 5.00pm and I worked til midnight."
vs
"I was on the day shift and I was there until 5.00."
Then negative:
"I wasn't there by 5.00 because my bus didn't show up on time. But I was only a few minutes late."
vs
"I wasn't there until 5.00, because that's when my shift starts."
Now, there's no way the two sentences in the first example can mean the same thing. The two employees might have met in the staff room as one clocked off and the other clocked on, but they were doing two clearly different shifts.
The second example has a similar outcome, i.e., that at some time after five o'clock, both employees were at work, but the circumstances are somewhat different. In the first case '... was not there by...' means 'was there later than', in the second, '... was not there until ...' , means 'was there at'.
I hope this clears it up.
Best Answer
Let's look at the definition of "late":
These two phrases, despite being similar, are actually using different definitions of "late".
The first one, "stay late" is the first definition, which is referring to something being after a usual time. It's relative to the speaker, not tied to any particular or specific time.
The second, "until late" is using the second definition, which is referring to a specific later part of a time period, in this case a day. It's common in English to say "late in the evening" to refer to the last few hours of the day (i.e. 9:00 P.M. through 11:59 P.M.).
In other words, by saying you will "stay late" you're only saying you're going to be staying past the time you would normally leave. This could be at any point in the day depending on what is normal for you. So if you use the "stay late" version you're relying on context to fill in the specifics (such as when you normally leave and what would be considered "late"), that the person you're speaking to would already know. As an example, if you normally go home at 3:00 P.M., then leaving at 4:00 P.M. would be considered "staying late", even though this would not be considered "late hours".
If you use the second form, "until late" or "until late at night", you're specifically talking about working until the evening, or "late hours" when most businesses are closed.