If you can’t beat ’ em, copy ’em.

Marvin Ellison, the new chief executive at Lowe’s, says his plan to fix the floundering home-improvement chain includes a few tricks he learned from his days as an executive at Home Depot, according to analysts to whom he’s spoken.

“He’s going to replicate the Home Depot playbook where he can,” Gordon Haskett analyst Chuck Grom told The Post. “Ellison thinks there’s a lot of market share up for grabs.”

A 12-year veteran of Home Depot who got passed over for the top job there in 2014, Ellison has already tapped two former Home Depot executives to head up stores and merchandising since he arrived three months ago.

Lowe’s has suffered from “self-inflicted mistakes,” Ellison told analysts at a closed-door meeting this week.

Customers are too often told that merchandise is out of stock or reps are unable to locate whether a store has an item — unlike the Home Depot app, which tells customers if products are in stock and where they are in aisles. Lowe’s also lacks local merchandise, Ellison said.

But cutting labor costs — a relentless tactic at Home Depot that has earned its stores a reputation for forcing customers to walk across multiple aisles in search of help — also could be a key part of Ellison’s playbook.

In recent conversations with Wall Street analysts and investors, Ellison signaled that he will cut hours for store workers while expanding the use of in-store technology, including self-checkout lanes.

Ellison “remained adamant that labor hours in-store would go down as the team gets both more efficient and leverages technology in the coming years,” Grom wrote in a Thursday research note.

A Lowe’s spokeswoman said management is “re-engineering processes” to give employees more time to focus on customers.

“For example, we are deploying enhanced mobile devices with better capabilities to our stores so our associates can reduce time spent on non-sales processes and instead spend more time on customer service.”

It’s not clear whether Ellison is the man to fix Lowe’s. He arrived at the company in July after abruptly abandoning his turnaround plan at JCPenney, where he was CEO for three years — a tenure during which Penney’s shares dropped 50 percent.

Ellison’s departure from Penney, which came after hedge-fund billionaire Bill Ackman invested in Lowe’s, left the department store in the lurch, with its shares recently trading at their lowest levels since Penney debuted as a public company in 1978.

Ellison joins Lowe’s at a time when it is already showing signs of promise.

Sales in the second quarter — with Ellison joining the company during its final month — rose 7.1 percent to $20.9 billion and comparable sales rose 5.3 percent.

While they both operate just over 2,000 stores, Home Depot’s $100.9 billion in sales dwarfs Lowe’s $68.6 billion — a gap Ellison believes he can bridge by improving the customer service at Lowe’s and improving the chain’s inventory management.

“He’s the right person for Lowe’s right now,” Grom told The Post. “They need a disciplinarian, and he’s that person at least for the first few innings of the game.”