In this paper we obtain optimal bounds for the length of the longest arithmetic progression in various kinds of sum-sets. As an application, we derive a sharp estimate for the number of sets $A$ of residues modulo a prime $n$ such that no subsum of $A$ equals $x$ modulo $n$, where $x$ is a fixed residue modulo $n$.