Flexibility is a widely used term in planning process and real-time operation. The existing research on flexibility uses different techniques to study flexibility property from different aspects. While studying a property from various viewpoints increases the understanding on the subject, we need a consistent theoretical framework to consolidate the ideas generated in the field, compare and contrast results, and build on for future analysis. Based on the insights of the nature of flexibility, we propose a unified framework for defining and measuring flexibility in power system. Under the proposed framework, we propose a flexibility metrics which evaluates the largest variation range of uncertainty that the system can accommodate. Such a metrics takes into account transmission network and system operations constraints, which are critical to assessing flexibility, but are often ignored in literature. A robust optimization technique is used to calculate the proposed metrics. While the illustrative example presented in this talk focuses on the flexibility in real-time system operation in the presence of wind uncertainty, this framework can generally be applicable to long-term studies such as system planning.