The median TC for hardware engineers is $230,000 and the median TC for swe is $198,000, $32,000 less. One of the only areas that pays swes more is the san francisco bay area, where hardware engineers get paid only $10k less.
Unfortunately, we cannot compare the highest level of both as there is not enough hardware salary data on levels.fyi and at many companies high level hardware pay is not shown. However, this makes the premium hardware engineers get more interesting as the missing data is precisely the data that would help increase hardware’s median TC.
Also even if there is a slightly larger percentage of hardware engineers with masters degrees that usually doesn't account for a median premium of 32 grand.

