A Reddit user has used maths to determine which Star Wars films in the franchise are the most and least divisive.

The internet movie fan known as TheNeptunianSloth used data from IMDb to rank the films that cause the most and least disagreement.

The idea behind this undertaking came from the feedback from fans who saw the latest Star Wars film, The Last Jedi and were not happy with it.

Since a variety of news sources called The Last Jedi "the most divisive," it struck TheNeptunianSloth with the idea.

“It got me wondering: can we know for sure that it actually is the most divisive film in the series,” they explained.

The Reddit user further contemplated, “By how much is it more divisive than the second most divisive film? “What is the least divisive one?”

TheNeptunianSloth decided to create a rating system based on IMDb's data, by determining the standard deviation of each film rating from its overall rating.

The higher the number: the more divisive the film.

The rankings determined are below:

1. The Last Jedi – 2.696

2. The Phantom Menace – 2.062

3. Attack of the Clones – 1.914

4. Revenge of the Sith – 1.837

5. Return of the Jedi – 1.695

6. The Force Awakens – 1.612

7. A New Hope – 1.602

8. The Empire Strikes Back – 1.517

9. Rogue One – 1.405

"Although The Last Jedi doesn't have quite as many ratings as, for instance, the originals, we now have mathematical proof that TLJ is in fact the most divisive film in the series so far, and as a matter of fact by a long shot," the Reddit user wrote.

TheNeptunianSloth said that The Last Jedi was in fact the most disagreeable film - however he notes that the data was also dependent on who was most vocal about their distaste for one of the movies.

In any case, this Reddit user reminded us that maths is fun - when applied to Star Wars.