Four runs a game. That’s all it takes for the Royals. Four runs a game, which is still nearly half-a-run below the average for all other American League teams.

When the Royals score four or more runs, as they did Wednesday night, they turn into legitimate postseason contenders. Really. Check the numbers after their 4-1 victory over the Minnesota Twins at Kauffman Stadium.

The Royals are now 17-5 when they score at least four runs. Seventeen and flipping five. That’s what four runs does.

“The lineup just seemed to flow,” said designated hitter Billy Butler, who had three of the Royals’ eight hits. “It was a good lineup and we’re going to give it a shot for a little while now.

“You’ve got to give the stats guys a little credit sometimes, I guess. I’ll give that one to them because I liked that lineup.”

Manager Ned Yost, after consulting with the club’s stat analysts, sent out a new-look batting order that, among other things, had Eric Hosmer batting second and Salvy Perez batting third.

The retooled lineup produced four runs — the magic number — and it proved sufficient to halt a galling home losing streak that had reached a franchise-record 11 games.

“It always feels good,” Butler said, “especially when the weather was bad tonight, and we had some good fans out there that hung around. It was a tough streak and I’m glad it’s over.”

The victory also enabled Jeremy Guthrie to become the first Royals starter to win a game since Wade Davis on May 15. Let me save you a look at the calendar. That’s the first victory by a starter in three weeks.

It’s not like the Royals mashed the ball, but they did get three key hits, including a pair with two outs: a two-run double by David Lough in a three-run first inning, and an RBI single by Butler in the seventh.

Lough served a sinker from Twins starter P.J. Walters into left field.

“I kind of went with the pitch,” Lough said. “It was one of those sinkers away, and he kept it up a little bit. I stayed on top of it, and I was able to drive it that way.”

Lough’s double came after Perez erased an early 1-0 deficit by lashing a one-out RBI single just after Hosmer reached on a two-base error by shortstop Pedro Florimon.

Guthrie, 6-3, and the bullpen took it from there. Guthrie survived a 39-pitch first inning that included three walks by pitching through the sixth and limiting the Twins to one run.

“I walked a lot of guys in the first,” Guthrie said. “I didn’t throw a lot of strikes. Yeah, I changed. I started throwing strikes It was quite a dramatic change from not throwing them to throwing them.

“A bright light went on. I said, ‘If I walk guys, I probably won’t go very long.’”