Quality of service (QoS) is a major concern in the design and management of a composite service. In this paper, a systematic approach is proposed to calculate QoS for composite services with complex structures, taking into consideration of the probability and conditions of each execution path. Four types of basic composition patterns for composite services are discussed: sequential, parallel, loop, and conditional patterns. In particular, QoS solutions are provided for unstructured conditional and loop patterns. We also show how QoS-based service selection can be conducted based on the proposed QoS calculation. Experiments have been conducted to show the effectiveness of the proposed method.