CBS and Viacom are inching closer to a deal to reunite Sumner Redstone’s media empire, sources tell The Post.

The two companies, which are both majority owned by Redstone’s National Amusements Inc. holding company, agreed on a range for combining their stock after resubmitting proposals for the contested stock exchange ratio last week.

The agreed-upon range — of 0.59 to 0.60 of each CBS share for each Viacom class B share — values Viacom at slightly below its $12 billion market value from Friday. It represents a small premium for CBS shareholders.

Viacom’s class B shares fell 4.9% Monday, to $28.53. CBS shares fell 1.8%, to $48.03.

The exchange rate could still change, but both companies are expected to settle on a ratio that “starts with 0.5,” one source close to the deal told The Post.

The exchange ratio currently favors CBS thanks in part to its strong performance of late, including greater-than-expected subscriber numbers for its direct-to-consumer service CBS All Access and for Showtime, which it owns.

CBS also continues to expand its retransmission revenue, and recently re-upped its carriage agreement with AT&T’s DirecTV.

CBS, with a market valuation of $18.5 billion, is the larger of the two companies, but the combined firm is expected to be named Viacom, according to reports.

Reuters said the name is a nod to the legacy of Redstone, 96, who acquired Viacom in 1987. Redstone’s daughter, Shari, who holds the role of vice chair of both companies, is expected to become the merged company’s chair, sources said.

This is the third attempt by CBS to bring the two companies together since 2016. The plan is to create a media conglomerate that can compete with the likes of Netflix and Amazon.

CBS, which produces “The Big Bang Theory,” owns Showtime and Simon & Schuster publishing company. Viacom owns Nickelodeon and MTV.

After CBS and Viacom merge, Shari Redstone could continue to buy up media companies, analysts have said.

Potential acquisition targets could include movie studio Lionsgate, its premium cable channel Starz, Sony Pictures, MGM or Discovery Communications. And as The Post recently reported, there has also been chatter over the potential acquisition of Take-Two, the gaming company run by CBS interim chairman Strauss Zelnick.