According to new data from analyst firm Ampere Analysis, the Nintendo Switch is currently beating the Xbox One's total global hardware sales.

The Xbox One has been on the market for seven years now, and compromises four separate SKUs--the 2013 Xbox One, the Xbox One S, Xbox One S All-Digital Edition, and Xbox One X. But the Switch hardware family--Switch and Switch Lite--has already beaten the Xbox One's sales in just four years on the market. This makes sense considering the Switch is the fastest-selling current-gen console in the US.
According to new figures from Ampere Analysis, which estimates total sales up until Q1'20, the Switch has sold 53 million units compared to the Xbox One's 49 million. Remember Microsoft no longer reports hard console sales figures so this data is an estimate.
The PlayStation 4 dominates both systems with 108 million in total global sell-through. This value is different from the 110.4 million sell-in (shipments) that Sony reported as of FY2019.
Microsoft is ultimately okay with this disparity. The company still routinely earns $10 billion or so from games every year, driven by strong monetization of its services, game sales, and online infrastructure.
Comparatively, Sony and Nintendo make more from games hardware, software, and services: Sony earned $18 billion in FY2019 from games, and Nintendo earned $12 billion in revenues from games in the same period.

The reality here, though, is that Microsoft doesn't care all that much about Xbox. And it certainly doesn't care tremendously about hardware.
The real money is made from subscriptions like Xbox LIVE Gold, Game Pass, and Project xCloud, along with the billions generated from software sales on the Microsoft Store and Xbox Store. Microsoft has found a way to diversify its earnings beyond hardware, whereas both Sony and Nintendo are much more dependent on physical hardware ecosystems.
Microsoft could get a cross-generational lead over Nintendo at some point, though. Ampere also estimates the Xbox Series X will sell 37 million units by 2024. Throughout this time, Microsoft will enjoy cross-generational hardware sales overlap as the Xbox One is still supported, manufactured, and sold.
Nintendo could however launch its own Switch successor and continue to support the Switch, thereby widening the sales gap between the two systems.