
In the nick of time means just in time, at the very last possible moment before something bad happens or an opportunity is lost.
The key word is nick. In older English, nick could mean a precise point, notch, or exact mark. It was sometimes used for a marked point that showed the right moment or measure. Because of that, the phrase came to mean reaching the exact moment when action is needed.
Today, people use it when something happens barely soon enough.
- We got to the airport in the nick of time.
- The firefighter arrived in the nick of time to rescue the family.
The phrase usually suggests tension or relief. If you finish a test in the nick of time, you did not finish early. You finished only just before the deadline. That is why it is stronger than simply saying on time.
A useful contrast is this: on time means not late, but in the nick of time means almost too late.

