The past perfect is used to talk about:
Time up to another time in the past
We use the past perfect simple (had + past participle) when we talk about a past time before another time in the past. The events are related in some way.
She’d finished the report before she went home.
I’d already eaten dinner by the time my husband came home.
Had you studied English before you went to London for the first time?
Past perfect to show the order of two events in the past
The past perfect can make the order of two related past events clear. The past perfect is used for the earlier action and the past simple for the later action.
When I came home, she had gone out. OR She had gone out when I came home.
Versus: ‘She went out when I came home.‘ This does not clearly show which action was first.
Note: We don’t use the past perfect for a general list of past actions that followed each other:
I got up, ate breakfast, took a shower, and went to work.
My father studied at Cambridge, moved to Paris, got a good job, and a few years later met my mother.
Note: We often just use the past simple if it is clear which event or action was first and second.
I missed the bus because I got up late. Vs. I missed the bus because I had gotten up late.
I forgot to set my alarm so I work up late. Vs. I had forgotten to set my alarm so I woke up late.
She got wet because she left her umbrella at home by mistake. Vs. She got wet because she had left her umbrella at home.
Past perfect after ‘before‘
Before + past perfect can show that the earlier action was not finished or done when the second action (past simple) happened. Often the past perfect part of the sentence was expected to be finished first but something happened.
We left the theater before the movie had finished (because Tom felt sick).
The computer crashed before she had saved her file (which was not the plan).
The waiter took his plate away before he had finished eating.
Commonly used adverbs
Like with the present perfect we can use the adverbs already, still, just, recently, ever or never with the past perfect.
I invited him to watch a movie but he’d already seen it.
She still hadn’t finished wrapping the Christmas presents by Christmas Eve.
She ate a cookie just after she’d taken them out of the oven.
I‘d never heard of the band before my friend lent me their new CD.
Had you ever eaten really spicy food before you went to Thailand?
It was the most interesting book I‘d ever read.
Past perfect Continuous
The past perfect continuous is used to show clearly that the action had duration.
He had been working for 8 hours before he stopped for a break.
She had been living in New York for many years before she visited to the Statue of Liberty.