Sarcasm is perhaps one of the most complex and confusing features of human language. In this thesis, I aim to present a formal theory of sarcasm through the lens of the Rational Speech Acts (RSA) framework, which provides a probabilistic platform for modelling pragmatic and social reasoning in conversation. Many past formal models account for classical instances of sarcasm but fail to account for non-classical instances. This thesis describes one particular model that is capable of handling both classical and non-classical instances of sarcasm. An experimental validation showed that predictions made by this particular model closely correlated to human judgement predictions about sarcasm.