Does the yrs in L1-B status addes to H1-B status yrs

A query which I have found different answers on different blogs.

If one travels to US on L1-B and stays for 2 yrs on L1-B. Then gets H1-B . So, how many years does the candidate has under H1-B status.

Would it be 6 yrs( H1-B duration) - 2 yrs( under L1-B) = 4 yrs?

Thank you so much!

As per my understanding, the person will get 4 years.

Yes, you are right you will get 4 years on H1 B

Its 5 Years, if its combined with L1 + H1, i.e, 2 (Years for Current L1) + 3 (Max for the New H1B)