Software behavior models play an important role in software development. They can be manually generated to specify the intended behavior of a system, or they can be reverse-engineered to capture the actual behavior of the system. Models may differ when they correspond to different versions of the system, or they may contain faults or inaccuracies. In these circumstances, it is important to be able to concisely capture the differences between models, a task that becomes increasingly challenging with complex models. This paper presents the PLTSDiff algorithm that addresses this problem. Given two state machines, the algorithm can identify which states and transitions are different. This can be used to generate a 'patch' with differences or to evaluate the extent of the differences between the machines. The paper also shows how the precision and recall measure can be adapted to quantify the similarity of two state machines.