The local structures of Hf-O-N thin films were analyzed using an extended x-ray absorption fine structure (EXAFS) study of the Hf L-3-edge and first-principles calculations. Depending on their composition and atomic configurations, Hf4O5N2 [coordination number (CN): 6.25], Hf4O2N4 (CN: 5.5) and Hf4O2N4 (CN: 5.0) were suggested as the local structures of Hf-O-N thin films. Using the suggested local structures, the electronic structures of Hf-O-N thin films were calculated. The variations of the valence band were analyzed with the film composition and compared with the experimental valence band. The optical band gaps of Hf-O-N thin films were compared with the calculated values. The transition rate for the optical absorption was suggested as another reason for the band gap difference. Copyright (c) 2006 John Wiley & Sons, Ltd.