H1b transfer, visa length

I am currently on a h1b visa with company A, I have one and a half years left on my current visa. I am thinking about changing jobs, and wondering the following :

  1. If i change jobs will the visa still be valid for one and a half years, or will it be a new 3 year visa?
  2. If it is only valid for one and a half years, can i file for an extension at the same time as the transfer?

Thanks for your time

Your new employer will put in a 3 year request (or lesser) when applying your petition. USCIS will approve it for a certain term and that will govern its duration.

On H-1B, you can file for extensions/transfers until you have spent 6 years inside US on H-1B. After that, extensions can only be granted if there is a pending Green Card application.