The shape derivative of the cost functional in a Bernoulli-type problem is characterized. The calculation of the derivative of the cost does not use the shape derivative of the state variable and is achieved under mild regularity conditions on the boundary of the domain.