3-Card Tarot Spread Generator

Coded by Haley Halcyon

How to use this tool

This tool will generate 3 tarot cards from the Major Arcana of the Rider–Waite tarot deck. But before you press the button, think about what you want this tool to divine about. It could be love, work, studies, or generally your life, or even just today.

To the three cards, you can assign the meanings of “past/present/future”; “what you want/what the other party wants/where you are headed”, “the conscious/the subconcious/the world”, or other groups of three. There aren’t many rules at all in tarot reading; the cards simply serve as inspiration.

Read the above explanation before you start.

Not set
Not set
Not set

Technical explanation

Cards are drawn without replacement from the 22 cards of the Major Arcana, which yields 22 × 21 × 20 = 9240 combinations. Each card can be drawn in 2 orientations, which yields 2³ = 8 combinations. Multiplied together, that yields 73920 combinations.

This tool draws a random integer between 0 and 2^17, between which Javascript can reliably generate reasonably-uniform pseudorandom integers. If the result is greater than or equal to 73920, the random draw is discarded and the random number is generated again.

The first card is determined by dividing the result by 22, then the orientation by dividing the result by 2. The second card uses 21, the number of cards left in the deck by then. The third card uses 20, likewise. So small changes change the first card, and large changes change the last card.

However, this method sometimes produces duplicates. To prevent that, any draws that are equal to or larger than a previous draw must be incremented by 1. The calculation of this is slightly abbreviated; if it sees that the second card needs to be incremented, it checks if the last card needs to also be incremented, in which case, it increments the last card by 2.

Tarot card images are from Wikimedia Commons.

Warning

As with all fortune-telling and superstitions, take this with a grain of salt. Haley Halcyon does not recommend basing your life upon tarot readings or other kinds of supernatural drivel.