Here is the official comparison of the Pixel 2 XL and the iPhone Ⅹ (yes, that’s a Roman numeral).

Spec Pixel 2 XL iPhone Ⅹ
Display size 6 5.8
Resolution 1440 × 2560 1125 × 2436
Processor Snapdragen 835 A11 bionic
Rear camera 12MP — f/1.8 — 1.4 μm — OIS and DIS 12MP — f/1.8 f/2.4 — Dual OIS
Memory 4GB 3GB
Storage 64/128GB 64/256GB
Battery 3520mAh 2716mAh
Water resistence IP67 IP67
Extras Fingerprint FaceID