When Is A Lie Justified?

When it comes to telling the truth, we are all on a spectrum. Some people lie easily and often, other people lie only infrequently.

But, I would maintain, we all lie sometime. So, by extension, there are times when lying is acceptable or even preferred. So what are those times? When is a lie justified?

Related questions: What would happen if people were completely honest? How can we recognize dishonesty? How can we be more honest?