We use a notion of differentiability for functions on Alexandrov spaces and prove a splitting theorem for Alexandrov spaces admitting afine functions with such differentiability.