Study this example situation:

Sarah and David are married. They got married exactly 5 years ago, so today is their 5th wedding anniversary.

They have been married for 5 years.

They have been married for 5 years. - English Grammar - How long have you (been) …?
They have been married for 5 years.

 

We say:

They are married. (present)

but

How long have they been married? (present perfect)

                (not “How long are they married?”)

They have been married for 5 years.

                (not “They are married for 5 years.”)

We use the present perfect to talk about something that began in the past and still continues now. Compare the present and the present perfect:

  • Alice is in hospital.
Alice is in hospital. - English Grammar - How long have you (been) …?
Alice is in hospital.

 

but

  • Jason has been in hospital since Wednesday. (not “Jason is in hospital since Wednesday”)
Jason has been in hospital since Wednesday. - English Grammar - How long have you (been) …?
Jason has been in hospital since Wednesday.

 

  • We know each other very well.
We know each other very well. - English Grammar - How long have you (been) …?
We know each other very well.

 

but

  • We have known each other for a long time. (not “we know”)
We have known each other for a long time. - English Grammar - How long have you (been) …?
We have known each other for a long time.

 

  • Are you waiting for somebody?
Are you waiting for somebody? - English Grammar - How long have you (been) …?
Are you waiting for somebody?

 

but

  • How long have you been waiting?
How long have you been waiting? - English Grammar - How long have you (been) …?
How long have you been waiting?

 

I have been doing something (present perfect continuous) = “I started doing something in the past and I am still doing it (or have just stopped)”:

  • I’ve been learning English for a long time. (not “I am learning”)
I’ve been learning English for a long time. - English Grammar - How long have you (been) …?
I’ve been learning English for a long time.

 

  • Sorry I’m late. Have you been waiting long?
Sorry I’m late. Have you been waiting long? - English Grammar - How long have you (been) …?
Sorry I’m late. Have you been waiting long?

 

  • It’s been raining since I got up this morning.
It’s been raining since I got up this morning. - English Grammar - How long have you (been) …?
It’s been raining since I got up this morning.

 

The action can be a repeated action:

  • How long have you been driving?”  “Since I was 18.”
“How long have you been driving?” “Since I was 18.” - English Grammar - How long have you (been) …?
“How long have you been driving?” “Since I was 18.”

 

I have done (simple) or I have been doing (continuous)

The continuous is more usual with how long, since and for:

  • I’ve been learning English for a long time. (not usually “I’ve learned”)
I’ve been learning English for a long time. - English Grammar - How long have you (been) …?
I’ve been learning English for a long time.

 

You can normally use either the continuous or simple with live and work:

  • Nancy has been living / has lived in Vancouver for a long time.
Nancy has been living in Vancouver for a long time. - English Grammar - How long have you (been) …?
Nancy has been living / has lived in Vancouver for a long time.

 

  • How long have you been working / have you worked here?
How long have you been working here? - English Grammar - How long have you (been) …?
How long have you been working / have you worked here?

 

But we use the simple with always:

  • Paul has always lived in London. (not “has always been living”)
Paul has always lived in London. - English Grammar - How long have you (been) …?
Paul has always lived in London.

 

You can use the continuous or the simple for actions repeated over a long period:

  • I’ve been collecting / I’ve collected stamps since I was a child.
I’ve been collecting stamps since I was a child. - English Grammar - How long have you (been) …?
I’ve been collecting / I’ve collected stamps since I was a child.

 

Some verbs (for example, know/like/believe) are not normally used in the continuous:

  • How long have you known Maria? (not “have you been knowing”)
How long have you known Maria - English Grammar - How long have you (been) …
How long have you known Maria?

 

  • I’ve had a pain in my stomach since I got up this morning.
I’ve had a pain in my stomach since I got up this morning. - English Grammar - How long have you (been) …?
I’ve had a pain in my stomach since I got up this morning.

 

We use the present perfect simple in negative sentences like these:

  • I haven’t seen Jack since Monday. (= Monday was the last time I saw him)
I haven’t seen Jack since Monday. - English Grammar - How long have you (been) …?
I haven’t seen Jack since Monday.

 

  • Lisa hasn’t phoned me for two weeks. (= the last time she phoned was two weeks ago)
Lisa hasn’t phoned me for two weeks. - English Grammar - How long have you (been) …?
Lisa hasn’t phoned me for two weeks.