Thanking, as other speech acts such as apologizing or requesting, can be performed in numerous contexts and, for their analysis, many crucial variables must be taken into consideration (eg. social distance, gender, age, etc.), which often are difficult to control. Besides these variables, speech acts are carried out in different situations, taking into account the culture in which they are performed. For example, thanking might be performed after alighting a bus in the UK, the USA or Australia, but this might not necessarily happen in Spain. The aim of the study on which this paper is based, in to explore thanking contrastively in British English and in Peninsular Spanish from a pragmatic viewpoint, by looking at specific independent variables: the context and situation in which this speech act is performed, the relationship between the interlocutors who perform it, which includes social power and distance, and the reason for expressing gratitude. For the purpose of this investigation, a corpus of 128 textbooks (64 for each language) for the learning and teaching of Spanish and English as foreign languages was used. It is important to note that, although these corpora are built on prefabricated dialogues and these can be regarded as abstractions of reality, the communicative situations found in the textbooks are aimed at depicting exchanges and linguistic patterns representing what naturally occurs in real conversations in both cultures.