The residual stress through the thickness of a BaTiO3 ceramic film deposited on steel substrate at room temperature with aerosol deposition has been analyzed using synchrotron x-ray microdiffraction. A gradient in stress distribution was evident through the film and the maximum biaxial compressive stress of −800 MPa was observed at the film-substrate interface. Heat-treatment was found to relax the internal compressive stress, due to thermal expansion mismatch between the film and substrate. Variation in ferroelectric response was correlated to the change in stress state by thermal treatment. This analysis is crucial for development of micro-and nanoelectronic devices with AD films.