California has the nation’s largest wage gap between middle-income pay and what the state’s upper crust earns.

I filled my trusty spreadsheet with some detailed federal pay stats by state — annual wages for all workers, as of May 2018 — to compare California’s upper-income wages (defined by the 75th percentile, where three-quarters of all wages are lower, one-quarter are above) to the state’s median wage, the statistical mid-point that can serve as a benchmark for middle-income pay.

Last year’s upper crust wages ran 72% greater than the median in California, a spread that topped all states ahead of No. 2 New York at 68.1% and No. 3 Virginia at 67.7%. And it was far above the 50-state median of 57%. (Just so you know, the smallest gap among the states was found in South Dakota at 45.1%; then North Dakota at 45.2% and Vermont at 50%.)

And this wage gap is rising, especially in California. A decade earlier, the 75th percentile job statewide paid 66% more than the median wage. That put California for 2008 well above the 50-state median gap of 53% and ranked it No. 2 nationwide behind Illinois.

This paycheck spread between high salaries and mid-range wages helps identify the folks who can best afford the high cost of California living. It also shows why so many “luxury” brands love doing business in the state. Bottom line: Many jobs pay big bucks in this state.

Sadly, that same wealth creation also can create community-level discord, especially surrounding pocketbook issues. It’s not simple, either. It’s not just haves vs. have-nots … say, renters vs. owners. It can be have-lots vs. have-a-few-things.

For example, those high-level salaries help create upward pressure on housing costs. That can make it tricky to have rational discussions about cost-containment ideas — from building booms to rent control — as these debates often pit homeowners against each other, too.

So how did California get to this spot for 2018? Well, it’s median wage was 10th highest nationally at $42,430, by this pay measurement. The mid-range California job does not pay much more that the 50-state median of $37,125.

By the way, last year’s No. 1 for median wages was Massachusetts at $48,680; then Alaska at $48,020 and Connecticut at $46,920. Lowest? Mississippi at $30,580, then Arkansas at $31,850 and West Virginia at $32,640.

But when you look at high-level salaries, California provided the sixth-highest wage last year — $73,110 — at the 75th percentile. That’s a significant premium to the 50-state median of $58,805 and why the Golden State’s eye-catching wage gap occurs in the upper-half of the pay scale.

. Get weekly housing news on affordability, renting, buying, selling and more. Subscribe here. Sign up for The Home Stretch newsletter Get weekly housing news on affordability, renting, buying, selling and more.

The highest pay nationwide at employment’s upper crust — the 75th percentile — for 2018 was Massachusetts at $78,870, then New York at $75,610 and Connecticut at $75,060. FYI: Lowest was Mississippi at $47,550; then South Dakota at $48,550 and Arkansas at $49,140.

California’s nation-leading, high-end wage gap is a two-edged sword.

Yes, it’s a byproduct of the state’s success, on a nationwide scale, in creating jobs with significantly above-average pay. But it also suggests less luck for California jobs with mid-range salaries.

Note that since 2008, California’s 75th percentile wage is up 21% vs. the median’s rise of 16% in the decade.

PS: When I double-check this pay-gap thesis using California’s 90th percentile wage — what the top 10 percent makes — the state’s $117,590 wage ranked No. 3 nationally. But at 177% above the statewide median, it also reflected the nation’s worst high-to-median wage gap.