These resources have been reviewed and selected by STEM Learning’s team of education specialists for factual accuracy and relevance to teaching STEM subjects in UK schools.

Session 5: Credit Card Validation Algorithm

This lesson will teach you how credit card numbers are checked to make sure they are sensible and have the correct format but not necessarily correct when entering them online. It will take you through the algorithm step by step to show how the validation works before asking you to try for yourself. The session will take approximately 1 hour to complete. If you find you complete this in less time then try the extension task.

By the end of the session you will:

  • understand how credit card numbers are validated

  • be able to repeat the algorithm

  • be able to create your own number that is valid using the same algorithm

Show health and safety information

Please be aware that resources have been published on the website in the form that they were originally supplied. This means that procedures reflect general practice and standards applicable at the time resources were produced and cannot be assumed to be acceptable today. Website users are fully responsible for ensuring that any activity, including practical work, which they carry out is in accordance with current regulations related to health and safety and that an appropriate risk assessment has been carried out.

Information on the permitted use of this resource is covered by the Category Three Content section in STEM Learning’s Terms and conditions.