A gap in your resume is common, and most interviewers have heard every version of this question and every version of the answer before. What actually matters is not that a gap exists. It is how clearly and confidently you explain it, and how quickly you move the conversation forward afterward.
Why interviewers ask this at all
An interviewer asking about a gap is rarely trying to catch you in something. In most cases, they are checking for two things: whether there is a straightforward, honest explanation, and whether you can talk about a potentially uncomfortable topic with composure. How you answer often matters more than what actually happened during the gap itself.
Be direct, then move forward
State what the gap was in one or two plain sentences, without over-explaining or apologizing repeatedly. A caregiving period, a layoff, a health issue, or time spent studying for a certification are all reasonable, ordinary explanations that interviewers encounter regularly. Long, defensive justifications tend to draw more attention to the gap than a short, factual statement does, since extended explanation can unintentionally signal that you view the gap as something to be ashamed of.
Connect it to what you did with the time, if there is something genuine to connect
If you used part of the gap to build a skill, freelance, volunteer, or study something relevant, it is worth mentioning briefly, since it shows continued engagement. But this is optional, not required. If you did not use the time in a way that maps cleanly onto a productivity narrative, that is fine too. Not every gap needs a redemption story attached to it, and forcing one that does not feel genuine usually reads as exactly that, forced.
Redirect toward what you are ready for now
The strongest version of this answer spends relatively little time on the gap itself and more time on why you are ready and motivated for the specific role in front of you right now. Interviewers are typically asking about the past mostly as a way of understanding your present readiness, so steering the conversation there directly tends to land well.
Practice saying it out loud before the interview, not just in your head. A gap explanation that sounds rehearsed and defensive in the actual moment usually was never said out loud beforehand. Rehearsing your real answer aloud once or twice, even by yourself, changes how steady and natural it sounds when it actually counts.
What not to do
Avoid over-apologizing, avoid volunteering more detail than was asked for, and avoid bringing the gap up preemptively if it has not been asked about yet. If your resume already makes the timeline reasonably clear, you do not need to address it before anyone raises it as a question.
The bigger picture
Employers hire for what you can do next, not for a perfectly continuous timeline. A gap explained clearly and briefly, followed by a confident pivot to your actual qualifications for the role, almost always lands better than either silence about it or an over-explained, anxious account of exactly what happened and why it was not your fault.