An efficient procedure to calculate surface segregation profiles of substitutionally disordered binary alloys is presented. We show that a simple thermodynamic model with realistic atomic configurations at the surface region combined with the total energies obtained from exact muffin-tin orbitals calculations leads to accurate surface segregation profiles. We find that the calculated surface segregation energies in random alloys show significant dependence on the local environment of the atoms involved in the segregation process. Correspondingly, the alloy surface energy is significantly affected by the subsurface atomic layers. As an example the PdAg͑111͒ surface is considered.