Hillary Clinton has almost caught up with Donald Trump in campaign coverage on television and online, reducing a clear advantage Trump had against his opponents during the Republican primaries.

In July, Clinton got $513 million worth of U.S. media, just $20 million less than Trump, according to mediaQuant, a Portland, Oregon, firm that analyzes television, print and online media and social media — but not Facebook — for the quantity and quality of mentions of candidates.

“He’s kind of topped out,” said Paul Senatori, chief analytics officer at mediaQuant, about Trump.

The exact magnitude of these numbers — which, very roughly speaking, approximate how much candidates would be willing to spend if they had to buy the media coverage and online discussion they get for free — is both heavily disputed (more on that later) and not particularly important. What matters is how the value of one candidate’s coverage compares to another’s, and those figures show clearly that Clinton has rapidly caught up to Trump.

MediaQuant, which also quantifies media mentions for business brands, said in March that Trump had gotten nearly $2 billion in free media, a figure that was cited widely — including on this website — and called “the killer statistic of the season” by Jim Rutenberg in The New York Times this week. By now, though, that killer stat is months out of date. Trump had gotten $4.3 billion in free media in the 12 months through July, according to data provided by mediaQuant — nearly twice Clinton’s total.

But all those media mentions are now baked into the poll numbers, which sharply favor Clinton. What matters for the candidates is how they’re covered from now on, to complement the ads they and their supporting PACs can afford to buy. During the primaries, Trump held the reins of media coverage with a series of provocative comments, but he may find it harder to repeat that feat when facing just one opponent who is well-known and polarizing.

These figures should be viewed skeptically for several reasons, some of which Senatori brought up himself in a telephone interview. For one thing, mediaQuant is limited by the data it can access easily. Facebook, which represents a large share of public online media consumption, isn’t counted. Also, unlike analyses of more limited segments of media, it’s not practical to hand-code every blog post or online forum, so mediaQuant relies on automated tagging. Every article that mentions a candidate in the headline, the lead paragraph or at least twice in the body text counts.

And while the company’s software tries to detect sentiment, that’s notoriously difficult for machines (and not so easy for people). The company takes a conservative approach to the problem, Senatori said, treating most coverage as neutral and weighting the value of the most positive coverage only about three times as heavily as the value of the most negative coverage. As the century-old saying goes, “there is no such thing as bad publicity.” Senatori also pointed out that what a journalist might consider bad publicity for a candidate might not play that way to someone considering supporting him or her.

Converting media mentions to a monetary value also requires some heroic assumptions and is controversial among people who work in media. MediaQuant doesn’t assume a candidate would pay as much for an article that mentions him as he would for an ad of the same size running alongside it. The most any mention is worth is 44 percent of what it would cost to place an equivalent ad. Free media has pluses and minuses. “You don’t control it as much,” Senatori said, but “it has more credibility.”

Several media researchers expressed skepticism about mediaQuant’s methods because of the inherent limitations. Dan Cassino, a political scientist at Fairleigh Dickinson University who wrote a book about Fox News, said he thinks mediaQuant’s methods to evaluate coverage would make more sense for companies than for candidates.

“It’s a gimmick,” Cassino said. “A good gimmick, and one that will help them sell subscriptions to companies to track their media coverage. Ironically, they’re using something that they’re not really good at in order to sell something that they likely are doing pretty well.”

Senatori responded that what works for measuring brands should work for candidates: “I hate to say candidates are brands, but to a certain extent they are marketed as brands when it comes to an election.”