Card tricks based on mathematical principles can be a great way to get students interested in exploring some important mathematical ideas. Bonomo (2008) describes several variations of a card trick that rely on nested floor functions, but these generally go beyond the reach of beginning algebra students. However, a simple spreadsheet implementation shows students why the card trick works and allows them to explore several variations. As an added bonus, students are introduced to composite functions, the floor function, and iteration, and they learn how to use formulas and the INT function in Microsoft Excel. The depth of the mathematical explanation can be varied according to students' background.