Harry Potter and the Order of the Phoenix nearly hit the $1 billion mark at the worldwide box office, but Warner Bros. reported a loss in profit from the 2007 film. The fifth installment of the Harry Potter franchise sits in fourth place among the series' top box office performers, only behind both Deathly Hallows entries and Harry Potter and the Sorcerer's Stone. Despite the achievements in theatrical gross, Warner Bros. decided to go with a creative yet controversial accounting technique.

Based on the 2003 novel by J.K. Rowling of the same name, Harry Potter and the Order of the Phoenix followed Harry's fifth year at Hogwarts. Members of the Order of the Phoenix warned how oblivious the Ministry of Magic was to Lord Voldemort's return. Meanwhile, Harry and the rest of the Hogwarts students were forced to deal with the new Defense Against the Dark Arts professor, Dolores Umbridge. To further prepare for what was to come, Harry and his friends founded "Dumbledore's Army," a secret group training in defensive spells.

Related: Casting The Original Order Of The Phoenix For HBO Max's Harry Potter Show

In total, Harry Potter and the Order of the Phoenix made around $942 million worldwide, making it the second-highest-grossing film of 2007, just behind Pirates of the Caribbean: At World's End. With a budget in the $150-200 million region, it was assumed Warner Bros. made a hefty profit on the fifth Harry Potter movie, but that wasn't the case. According to leaked financial documents (via Deadline), the studio reported a loss of over $167 million on the film. While any feature film accrues major expenses, it's difficult to believe a movie that made close to a billion dollars worldwide would be in the red. But it all came down to Hollywood accounting.

Harry Potter and the Order of the Phoenix Is A Prime Example Of Hollywood Accounting

Harry, Neville, and the rest of Dumbledore's Army in Harry Potter.

Hollywood accounting, aka Hollywood bookkeeping, is a movie industry financial method used by studios to inflate expenditures in an effort to reduce net profits. This, in turn, lowers the amount corporations need to pay in taxes, royalties, and profit-sharing agreements. In Warner Bros. and Harry Potter's case, the studio claimed they spent enormous fees on distribution, advertising, and print, resulting in the $167 million loss. They also reported a $60 million interest fee, which was a rate far higher than the industry average. Essentially, this method hurt the cast and crew set to earn percentages of the net profit, considering Warner Bros. inflated fees, so there weren't any earnings to share.

The method used by Warner Bros. on Harry Potter and the Order of the Phoenix certainly wasn't the only known examples of Hollywood accounting. Lucasfilm did something similar with Return of the Jedi. A few years later, Paramount Pictures reported Coming to America didn't make a profit, leading to a lawsuit from writer Art Buchwald. Stan Lee also filed a lawsuit against Marvel when he didn't get his agreed cut of profits despite Spider-Man's $800 million in revenue in 2002. more recently, Universal Pictures claimed a loss of $87.8 million for their romantic-comedy, Yesterday, despite making $153 million compared to a $26 million budget. The method might be discouraging to cast and crew members, but the accounting technique doesn't seem to be disappearing.

More: Harry Potter: Bruce Springsteen's Song Explained (& Why It Was Cut)

Key Release Dates