Google promises 3 years of OS and security updates for Pixel 2/XL
Google has officially committed to keeping the new Pixel 2 and the Pixel 2 XL updated for the next 3 years, a solid commitment that outdoes all other Android phone makers. Yes, this includes both updates to the operating system and security updates.
One of the big downsides of owning most Android phones is software updates: even the big names like Samsung take months to update their phones and after the first major update, devices are often abandoned or take even longer for future operating system updates (they might still get security updates).
With the Pixel, you will get software updates for much longer than any other Android phone
What is surprising is that Google is not touting this extended support loud and clear, but hides it deep in the spec sheet and the support pages for the new Pixel phones. And here is the guaranteed software update timeline for the original Pixels and the 2017 versions of the phones:
The original Pixel is confirmed to get 2 years of operating system updates and 3 years of security updates, while with the new Pixels its 3 years for both OS and security.
source: Google Support