Bohemian Rhapsody” grossed more than $900 million at the global box office, but the screenwriter says he has not seen a penny of net proceeds, because he was told the film actually lost $51 million.

Anthony McCarten, a London-based novelist and playwright who also wrote the scripts for “Darkest Hour” and “The Theory of Everything,” filed the lawsuit in Los Angeles Superior Court, alleging that he is the latest victim of studio accounting.

“Bohemian Rhapsody” tells the story of the band Queen and its frontman, Freddie Mercury. The film cost about $55 million to produce, which would appear to make it incredibly profitable. But the suit contends that Twentieth Century Fox, the distributor and co-producer on the film, has used accounting gimmicks to avoid paying.

“If net proceeds don’t pay out on a low-budget film that does nearly a billion dollars at the box office, then they never will,” the suit states.

McCarten is suing GK Films, the production company that developed the film, and with whom he signed his contract. The suit alleges that McCarten is owed 5% of the film’s net proceeds, but that Fox has improperly substituted its own definition of that term.

GK Films, led by producer Graham King, is an independent company with a track record of financing major films including “Gangs of New York” and “Hugo.” According to the complaint, the company has a reputation for offering lower upfront rates in exchange for a more favorable definition of backend profits.

The suit states that McCarten was frustrated with his low fee for writing “Bohemian Rhapsody,” and at one point called Denis O’Sullivan, an executive at the company.

“The number is what it is,” O’Sullivan told the screenwriter, according to the suit, “but Graham wants me to tell you that as he did with Cameron Diaz on ‘Gangs of New York,’ he will take care of you in success.”

According to the complaint, McCarten expected that GK Films’ definition of net proceeds would resemble the film’s actual net proceeds, and that he would not be subject to traditional big studio accounting, which would erase any apparent profits by tacking on fees.

GK Films teamed with Fox in 2016 to co-produce and distribute the film, which starred Rami Malek and was directed by Bryan Singer. The film was released in 2018 and won four Academy Awards, including best actor for Malek.

McCarten did receive bonuses based on the box office performance of the film. But as for “net proceeds,” he has received two accounting statements from Fox. The first, in April 2019, claimed that the film had lost $105 million, while the second, in July 2021, claimed it had lost only $51 million, according to the suit.

McCarten alleges that GK Films has allowed Fox to use Fox’s definition of net proceeds, but that McCarten has never actually seen that definition or consented to it.

GK Films did not respond to a request for comment.