The 40 Best Math Movies

Ranker Film
Updated April 1, 2024 43.9K views 40 items
Ranked By
2.0K votes
724 voters
1 reranks

If you're a number enthusiast, a whiz at algebra, or just someone with an appreciation for all things math-related, this rundown of the best math movies ever made is sure to capture your interest. We've carefully curated a selection of math-centered movies that are not only critically acclaimed and audience favorites but also feature math in a crucial role.

From biographical tales of mathematical geniuses to fictional narratives intricately tied to mathematical theories, these films provide a fresh and engaging perspective on a subject that's often misjudged as dry or complex. They highlight the beauty, mystery, and ubiquity of math, expertly interweaving it with elements of drama, comedy, romance, and intrigue. They make the universal language of math a central character, driving the plot forward in unique and unexpected ways.

This list includes films from various genres and time periods, some of which are beloved classics, while others are waiting to be discovered. It highlights how filmmakers have creatively used math to build fascinating storylines and create unforgettable cinematic moments.

But, the magic doesn't stop with the movie list. We've made it easier than ever for you to stream these movies about math. Directly below each film, you'll find convenient streaming buttons for Netflix, HBO Max, Disney+, Amazon Prime, Paramount+, and Hulu, curated in no particular order. So get your popcorn ready and dive into this collection of mathematical movies from the comfort of your own home.

We didn't get to rankings by simply crunching numbers. The mathematics in movies, through their brilliance, have consistently captivated audiences. We believe in the power of collective decision-making. So, as you scroll through this treasure trove of math movies, we encourage you to vote up your favorites. Your input will help other math movie lovers discover and appreciate these exceptional films. Sit back, dive in, and let the ranking begin.

Most divisive: I.Q.
Over 700 Ranker voters have come together to rank this list of The 40 Best Math Movies
  • A Beautiful Mind
    1
    Russell Crowe, Ed Harris, Jennifer Connelly
    198 votes

    An inspiring emotional rollercoaster, this movie showcases the life of John Nash, a brilliant mathematician who struggles with schizophrenia. The intensely gripping narrative delves into Nash's journey, from his incredible academic achievements to the devastating impact of his mental illness –all the while demonstrating the power and beauty of mathematical concepts. With outstanding performances by Russell Crowe and Jennifer Connelly, this Oscar-winning film is a must-watch for any math enthusiast.

  • The Man Who Knew Infinity
    2

    The Man Who Knew Infinity

    Dev Patel, Jeremy Irons, Devika Bhise
    158 votes

    An inspiring emotional rollercoaster, this movie showcases the life of John Nash, a brilliant mathematician who struggles with schizophrenia. The intensely gripping narrative delves into Nash's journey, from his incredible academic achievements to the devastating impact of his mental illness –all the while demonstrating the power and beauty of mathematical concepts. With outstanding performances by Russell Crowe and Jennifer Connelly, this Oscar-winning film is a must-watch for any math enthusiast.

  • Good Will Hunting
    3
    Matt Damon, Robin Williams, Ben Affleck
    173 votes

    An unforgettable cinematic masterpiece, this movie follows the story of Will Hunting –a janitor at MIT who harbors an extraordinary talent for mathematics. Matt Damon's portrayal of a blue-collar prodigy battling inner demons is both endearing and heartbreaking while Robin Williams delivers a compelling performance as the psychologist tasked with helping Will unlock his true potential. A powerful exploration of human nature and innate intelligence, Good Will Hunting remains an iconic choice for math and cinema lovers alike.

  • The Imitation Game
    4
    Benedict Cumberbatch, Keira Knightley, Matthew Goode
    143 votes

    This thrilling historical drama delves into the life of Alan Turing, the brilliant British cryptanalyst who played a crucial role in breaking the German Enigma code during World War II. Benedict Cumberbatch captivates audiences as Turing –unraveling complex codes while also grappling with his own hidden identity as a homosexual man in a time when homosexuality was deemed illegal. The movie serves as an intense tribute to Turing's intellect and accomplishments while shining light on the tragic consequences of societal prejudices.

  • Stand and Deliver
    5
    Edward James Olmos, Lou Diamond Phillips, Rosanna DeSoto
    53 votes

    This inspiring classic is based on the true story of Jaime Escalante, a devoted mathematics teacher who helps transform a group of disadvantaged students into calculus whizzes. Edward James Olmos delivers a magnetic performance as Escalante –challenging the status quo while fostering hope and determination in his students. The film not only underscores the importance of education but also celebrates the limitless potential that can be unlocked through unwavering faith and hard work.

  • Hidden Figures
    6
    Taraji P. Henson, Octavia Spencer, Janelle Monáe
    42 votes

    A heartwarming celebration of black female mathematicians at NASA during the Space Race, this movie showcases the groundbreaking contributions of Katherine Johnson, Dorothy Vaughan, and Mary Jackson to American history. With powerful performances by Taraji P. Henson, Octavia Spencer, and Janelle Monáe, Hidden Figures highlights perseverance in the face of adversity while shining light on these trailblazing women's often overlooked roles in mathematical advancements.

  • A Young Brilliant Mind
    7
    Asa Butterfield, Rafe Spall, Sally Hawkins
    65 votes

    A sensitive portrayal of autism and its relationship with mathematical genius, this movie follows Nathan –a young boy struggling to navigate the complexities of teenage life while excelling in mathematics. Asa Butterfield delivers an empathetic performance as Nathan who learns to embrace his unique abilities and connect with others during an International Mathematical Olympiad competition. This touching film emphasizes the beauty of diversity within the mathematical community.

  • 21
    8
    Kevin Spacey, Kate Bosworth, Laurence Fishburne
    83 votes

    Based loosely on a true story, this thrilling drama chronicles a group of MIT students who master card counting techniques to win big at Las Vegas casinos. Led by their enigmatic professor played by Kevin Spacey, the group navigates high stakes gambling, deception, and personal dilemmas while putting their skills to the test. This engaging narrative offers a glimpse into the application of mathematical concepts in an unconventional but exhilarating context.

  • Gifted
    9

    Gifted

    Chris Evans, Mckenna Grace, Lindsay Duncan
    35 votes

    This heartwarming drama follows the story of a young math prodigy named Mary, who is caught in a custody battle between her uncle and grandmother, both wanting control over her future. The film explores themes of love, family dynamics, and the burden of exceptional intelligence on young people. With captivating performances by Chris Evans and Mckenna Grace, this movie offers both an emotional journey and a celebration of mathematical talent.

  • Pi
    10
    Sean Gullette, Mark Margolis, Ben Shenkman
    54 votes

    A mind-bending psychological thriller, this movie delves into the world of Max Cohen, a paranoid mathematician on the hunt for a mysterious numerical pattern hidden within the stock market. As Max unravels increasingly complex sequences and spirals into madness, viewers find themselves captivated by his relentless pursuit of numerical enlightenment. Stylish and surreal, Pi is a math lover's fever dream –pushing the boundaries between reality and obsession.

  • Proof
    11
    Gwyneth Paltrow, Anthony Hopkins, Jake Gyllenhaal
    18 votes

    In this intense drama, Gwyneth Paltrow portrays the daughter of a brilliant mathematician who grapples with the possibility that she may have inherited her father's genius as well as his mental illness. As she navigates her complex emotions and relationships, the elusive nature of truth and proof are explored through the lens of mathematical discovery. A compelling watch for those intrigued by the intersection of intellect and emotion.

  • Moneyball
    12
    Brad Pitt, Jonah Hill, Philip Seymour Hoffman
    51 votes

    Boasting a compelling narrative that combines baseball with advanced analytics, this movie chronicles the story of Oakland A's general manager Billy Beane as he revolutionizes the sport through data-driven decision-making. Brad Pitt delivers an enthralling performance as Beane –demonstrating how mathematical concepts can redefine success even in traditionally subjective arenas. Moneyball is not only a must-watch for sports enthusiasts but also anyone interested in real-world applications of mathematics.

  • The Theory of Everything
    13
    Eddie Redmayne, Felicity Jones, Emily Watson
    15 votes

    Eddie Redmayne's spellbinding portrayal of renowned physicist Stephen Hawking earned him an Academy Award in this poignant biographical drama. The film masterfully conveys Hawking's immense intellectual contributions to theoretical physics while presenting an intimate view into his personal life, including his relationship with his wife Jane and his battle with ALS. Touching and triumphant, The Theory of Everything celebrates human resilience and intellectual curiosity in equal measure.

  • Cube
    14
    Maurice Dean Wint, Nicole de Boer, Nicky Guadagni
    36 votes

    A thrilling psychological horror, this cult classic revolves around a group of strangers trapped in a labyrinth-like cube-shaped structure filled with deadly traps. As they attempt to navigate their way out, the characters uncover mathematical patterns hidden within the cube's design and must use their intellect to survive. This gripping film is a testament to the power of human ingenuity in even the most harrowing circumstances.

  • The Accountant
    15
    Ben Affleck, Anna Kendrick, J.K. Simmons
    16 votes

    An action-packed thriller with a mathematical twist, this movie follows Ben Affleck as Christian Wolff –a high-functioning autistic savant who expertly juggles numbers for dangerous criminal organizations while combating his own personal demons. This exhilarating film showcases how extraordinary mathematical skills can sometimes manifest in unexpected ways.

  • Primer
    16
    Shane Carruth, David Sullivan, Casey Gooden
    26 votes

    An intellectually engaging sci-fi thriller, Primer delves into the world of time travel through the perspective of two engineers who inadvertently create a functional time machine. The plot unravels as they explore the perplexing implications and moral dilemmas brought on by their invention –all while grappling with complex concepts rooted in mathematics and physics. For viewers seeking a challenging and thought-provoking viewing experience, Primer delivers in spades.

  • I.Q.
    17
    Tim Robbins, Meg Ryan, Walter Matthau
    28 votes

    In this charming romantic comedy, Meg Ryan and Tim Robbins star as unlikely lovers caught in a web of deception involving none other than famed physicist Albert Einstein. The film combines humor, romance, and an appreciation for intellectual achievement –resulting in a lighthearted yet satisfying watch for math enthusiasts.

  • Perfect Number
    18

    Perfect Number

    Lee Yo-won, Ryoo Seung-bum, Gye-nam Myeong
    10 votes

    This suspenseful South Korean film revolves around a brilliant but socially awkward mathematician who becomes caught up in an unexpected crime. As the protagonist attempts to use his intellect and knowledge of numbers to navigate his way out of the tangled web he finds himself in, viewers are treated to an exciting exploration of math's darker applications.

  • Fermat's Room
    19
    Alejo Sauras, Elena Ballesteros, Santi Millán
    27 votes

    In this Spanish thriller, a group of mathematicians is invited to solve an enigmatic puzzle in a mysterious room. As they race against time to unravel the riddle, they confront their darkest fears and secrets –engaging viewers with both mathematical intrigue and psychological tension. Fermat's Room offers an absorbing journey into the minds of those consumed by mathematical obsession.

  • Flatland: The Movie
    20
    Kristen Bell, Martin Sheen, Michael York
    9 votes

    This animated adaptation of Edwin A. Abbott's classic 1884 satirical novella brings to life the whimsical world of Flatland –a two-dimensional universe inhabited by geometric shapes. As the protagonist, a square, discovers higher dimensions and escapes the confines of his linear world, this film presents an engaging exploration of mathematical concepts while also touching on themes of prejudice and self-discovery.

  • Travelling Salesman
    21

    Travelling Salesman

    Matt Lagan, Steve Lawton, Marc Raymond
    11 votes

    In this intellectually stimulating indie thriller, a group of mathematicians gathers to debate the ethical and moral implications of solving the notorious "travelling salesman problem," a mathematical conundrum with far-reaching consequences in their alternate reality. As tensions rise, viewers are drawn into an engrossing narrative that explores the power, responsibility, and potential dangers associated with advanced mathematical knowledge.

  • Infinity
    22
    Matthew Broderick, Patricia Arquette, Peter Riegert
    28 votes

    A biographical drama based on Richard Feynman's Nobel Prize-winning work in quantum electrodynamics, this movie delves into the life and mind of one of the 20th century's greatest physicists. The film showcases not only Feynman's immense intellectual contributions but also his personal life –including his enduring love for his wife Arline. Infinity is a heartfelt tribute to a remarkable man whose genius transcended traditional academic boundaries.

  • The Mirror Has Two Faces
    23

    The Mirror Has Two Faces

    Barbra Streisand, Jeff Bridges, Lauren Bacall
    23 votes

    This romantic dramedy stars Barbra Streisand as Rose, an introverted math professor who yearns for love and connection despite her plain appearance. The film skillfully weaves together themes of self-discovery, inner beauty, and acceptance –showcasing how one's passion for mathematics need not be at odds with personal fulfillment.

  • The Oxford Murders
    24

    The Oxford Murders

    Elijah Wood, John Hurt, Leonor Watling
    24 votes

    In this gripping thriller, a young mathematician named Martin becomes entangled in a series of murders linked by enigmatic mathematical symbols while studying at Oxford University. As he and his eccentric mentor attempt to unravel the mystery surrounding these crimes, they confront their own personal demons amidst intellectual intrigue. The Oxford Murders provides a captivating mix of mathematics, suspense, and human drama.

  • Dear Brigitte
    25
    James Stewart, Fabian, Glynis Johns
    7 votes

    In this light-hearted comedy, James Stewart stars as a professor whose son happens to be a mathematical prodigy obsessed with French actress Brigitte Bardot. When the boy writes an equation-filled love letter to Bardot, antics ensue that weave together humor, charm, and heartwarming family dynamics –ensuring an enjoyable viewing experience for math enthusiasts and casual moviegoers alike.

  • The Professor and His Beloved Equation
    26
    7 votes

    In this insightful Japanese drama, an undocumented housekeeper learns about life, love, and self-discovery while caring for a world-renowned mathematician suffering from short-term memory loss. The film presents a touching exploration of relationships and human connection through the lens of mathematical wonderment.

  • 21 Grams
    27
    Sean Penn, Benicio Del Toro, Naomi Watts
    19 votes

    While not centered around mathematics specifically, this emotionally intense drama employs a unique nonlinear narrative structure that challenges viewers to piece together its intricate story like solving a complex puzzle. With superb performances from Sean Penn, Naomi Watts, and Benicio del Toro, 21 Grams offers an engaging exploration of fate, redemption, and interconnectedness that may resonate with math aficionados.

  • Straw Dogs
    28
    Dustin Hoffman, Susan George, T.P. McKenna
    16 votes

    In this controversial psychological thriller, initially released in 1971, a mild-mannered mathematician played by Dustin Hoffman confronts escalating violence within a rural English village after moving there with his wife. The film's disturbing exploration of human aggression and masculinity may be of interest to those intrigued by the complex inner workings of the mathematical mind under duress.

  • Britain's Greatest Codebreaker
    29

    Britain's Greatest Codebreaker

    Paul McGann, Ed Stoppard, Henry Goodman
    8 votes

    This documentary provides a fascinating look at the life of Alan Turing –a legendary British cryptanalyst and mathematician who played a crucial role in cracking Nazi codes during World War II. Through rare archive footage and interviews with those who knew him, this film paints a captivating portrait of Turing as both a mathematical genius and a vulnerable individual grappling with societal prejudice.

  • Colossus: The Forbin Project
    30
    Eric Braeden, Susan Clark, Gordon Pinsent
    8 votes

    A chilling sci-fi thriller from 1970, this movie explores the potential consequences of artificial intelligence gone awry when a powerful supercomputer gains self-awareness and threatens global security. As the protagonist, Dr. Forbin, races against time to prevent catastrophe, the film delves into complex mathematical theories behind the creation and control of intelligent systems. Colossus: The Forbin Project is a prescient and captivating exploration of the intersection between mathematics and emerging technologies.