GI Makes more, however, it has a much longer fellowship to complete after IM Residency, and you work long hours.
I think if you do 7 on 12 hour shifts in a week as a hospitalist, that would be 168 hours a month.
GI Doctors probably work 9-5 In their office, but then are on call many nights, and then do procedures whether it colonoscopies, endoscopies, or emergent GI-related procedures (ERCP, Hepatic abscess drainages, etc. etc. etc.) - Let's assume they work 50-70 hours a week. That would be anywhere from 200-280 hours a month.
So, if let's say Hospitalist makes 265k, and Gastroenterologists make ~420k, this would mean that, and I know my math is probably very wrong here because im not including tax, vacations, or countless other factors, but:
Let's pretend all GIs work 240 hours a month - That's 2880 hours a year
Let's pretend all hospitalists work 168 hours a month - That's 2016 hours a year.
That would roughly mean GIs make about 145$/hr
That would roughly mean Hospitalists make about 131$/hr
So, while GIs do make more money per year, the hourly pay rates are not extremely extremely far off.
Furthermore, while the GI Fellow makes 70k-80k for 3 years after IM Residency, the Hospitalist is making the 240-260k for 3 years during that time.
So, hospitalist is not a bad gig, but, while the GI doc can slow down their practice as they get older while continuing to still rake it in because of a large patient pool, and you become more "Automatic" with your procedures and midlevels helping manage your acute things, your life becomes easier as you get older whereas a Hospitalist will always be expected to work at 100% capacity regardless because you have less autonomy being only hospital-based.
Plus, if you want to switch over to doing outpatient primary-care, you'll expect a pretty significant pay reduction until you work many years to get your patient roster up to where all the other docs are who have been doing it for years. In the long run, PCPs can make equivalent or more to a hospitalist due to upward mobility, but the $$/hr will be way less because PCPs work probably more like the GI doc's hours, but only make 93$/hr probably, if you consider many PCPs make 225k @ about 50 hours a week.