Skip to main content
Home
plus.maths.org

Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • Main navigation

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • For

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Popular topics and tags

    Shapes

    • Geometry
    • Vectors and matrices
    • Topology
    • Networks and graph theory
    • Fractals

    Numbers

    • Number theory
    • Arithmetic
    • Prime numbers
    • Fermat's last theorem
    • Cryptography

    Computing and information

    • Quantum computing
    • Complexity
    • Information theory
    • Artificial intelligence and machine learning
    • Algorithm

    Data and probability

    • Statistics
    • Probability and uncertainty
    • Randomness

    Abstract structures

    • Symmetry
    • Algebra and group theory
    • Vectors and matrices

    Physics

    • Fluid dynamics
    • Quantum physics
    • General relativity, gravity and black holes
    • Entropy and thermodynamics
    • String theory and quantum gravity

    Arts, humanities and sport

    • History and philosophy of mathematics
    • Art and Music
    • Language
    • Sport

    Logic, proof and strategy

    • Logic
    • Proof
    • Game theory

    Calculus and analysis

    • Differential equations
    • Calculus

    Towards applications

    • Mathematical modelling
    • Dynamical systems and Chaos

    Applications

    • Medicine and health
    • Epidemiology
    • Biology
    • Economics and finance
    • Engineering and architecture
    • Weather forecasting
    • Climate change

    Understanding of mathematics

    • Public understanding of mathematics
    • Education

    Get your maths quickly

    • Maths in a minute

    Main menu

  • Home
  • Articles
  • Collections
  • Podcasts
  • Maths in a minute
  • Puzzles
  • Videos
  • Topics and tags
  • Audiences

    • cat icon
      Curiosity
    • newspaper icon
      Media
    • graduation icon
      Education
    • briefcase icon
      Policy

    Secondary menu

  • My list
  • About Plus
  • Sponsors
  • Subscribe
  • Contact Us
  • Log in
  • How to (pretend to) memorise a pack of cards

    by
    Salim Neil Khan
    29 January, 2021

    Here is a neat way of using maths to pretend to memorise a pack of cards.

    The trick

    First, get your audience to inspect the cards so that they know it is a standard pack, and then get them to shuffle the cards so that they know that they aren't in any pre-prepared order. Then ask them to randomly pick out any card from the pack and not show it to you. You then state that you will quickly look through the remaining cards, memorising them as you go, so that when you get to the end you will know which card is missing, and hence will be able to declare which card they have.


    The process

    6 of clubs, 2 of spaces, Queen of diamonds

    6+2+12 = 20, which resets to 20-13=7.

    As you look at the cards one by one, you add their values to obtain a cumulative (running) total. Note that Aces have a value of 1, Jacks are 11, Queens are 12, and Kings are 0. Whenever your total reaches 13, reset it to 0. For example if the first three cards you see are 6, 2, Q, then your total is 6+2+12 = 20 which would give you a revised total of 20-13 = 7. Then if your next card is, say an 8, your revised total would be 2.

    You continue this for all 51 cards. Then to determine the value of the missing card you simply subtract your final revised total from 13. For example if the final revised total is 2, then their card is a Jack. To determine the suit, you can very quickly skim through the cards again, scanning for the Jacks, and see which suit is missing. You then, much to the amazement of the audience, confidently declare that you have memorised the entire pack and hence state the missing card that they are holding!


    The maths

    So, how does it work?

    There are four suits so the sum of the values of a full pack of cards is (1 + 2 + … + 12 + 0) x 4, which works out to be equal to 312. (Interestingly 1 + 2 + … + 12 is an arithmetic series, a sum with the same difference between each term and the next, so there are handy formulas to calculate the sum of these series.)

    hidden card

    What is the value V of the missing card?

    When looking through the cards during our trick, if we had simply added together the value of the cards (without repeatedly resetting to 0) to obtain our running total, T, then the value of the missing card is V = 312 – TF where TF is our final total. This method would also have worked but the mental arithmetic under time pressure would have been a lot trickier due to the larger numbers involved.

    Instead, as 312 is a multiple of 13, we can keep the numbers small by using modular arithmetic. In essence this means that when we are obtaining our revised totals R, we are finding the remainder when we divide our total by 13. (You can read more about modular arithmetic here.) This can be written as R ≡ T (mod 13). Once we have our revised final total, RF, we know that adding V will increase it to 13. Hence V = 13 – RF.

    Practice makes perfect

    It takes a few attempts to get used to no longer adding in base 10 and you will make mistakes initially whilst trying this. In fact, I have found the addition easier if instead I give Queen the value -1 and Jack the value -2 (which amounts to the same method). Hopefully, after a bit of practice, and with some concentration, you should be able add accurately in under 2 seconds per card, and the final scan through for the suit should only take 3 or 4 seconds. This would give an overall "memorising" time of under 2 minutes, which might impress your family and friends, especially if you claim it makes you a Grand Master of Memory!


    Slim Khan

    About the author

    Slim Khan is a Teaching Fellow at the University of Warwick, and is particularly interested in mathematics and statistics related to games and sports.

    • Log in or register to post comments

    Read more about...

    mathematics and magic
    card games
    modular arithmetic

    Our Podcast: Maths on the Move

    Our Maths on the Move podcast brings you the latest news from the world of maths, plus interviews and discussions with leading mathematicians and scientists about the maths that is changing our lives.

    Apple Podcasts
    Spotify
    Podbean

    Plus delivered to you

    Keep up to date with Plus by subscribing to our newsletter or following Plus on X or Bluesky.

    University of Cambridge logo

    Plus is part of the family of activities in the Millennium Mathematics Project.
    Copyright © 1997 - 2025. University of Cambridge. All rights reserved.

    Terms