A piezoelectric element comprising: a first electrode; a piezoelectric layer, placed on or above the first electrode, containing a perovskite-type composite oxide including potassium, sodium, and niobium; and a second electrode placed on or above the piezoelectric layer, wherein the piezoelectric layer further includes titanium; and characterized in that: wherein the unevenness of titanium in the piezoelectric layer is indicated by a U-value and the U-value is 140% or less and satisfies the following formula: U = 2 × I MAX − I MIN / I MAX + I MIN × 100 where I MAX is the maximum intensity of a signal from the titanium in a predetermined zone of the piezoelectric layer as analyzed from the second electrode side in a depth direction by secondary ion mass spectroscopy and I MIN is the minimum intensity of the signal from the titanium in the predetermined zone of the piezoelectric layer as analyzed from the second electrode side in the depth direction by secondary ion mass spectroscopy, wherein the predetermined zone (α) is defined as a portion of the piezoelectric layer excluding a depth from a first intersection to 10% of a zone (β) of the piezoelectric layer and a depth from a second intersection to 10% of the zone (β), where the first intersection is an interface between the piezoelectric layer and the second electrode, the second intersection is an interface between the piezoelectric layer and the first electrode, and the depth of the zone (β) is a distance between the first intersection and second intersection, as determined from the intensity of a signal of niobium. a first electrode; a piezoelectric layer, placed on or above the first electrode, containing a perovskite-type composite oxide including potassium, sodium, and niobium; and a second electrode placed on or above the piezoelectric layer, wherein the piezoelectric layer further includes titanium; and characterized in that: wherein the unevenness of titanium in the piezoelectric layer is indicated by a U-value and the U-value is 140% or less and satisfies the following formula: U = 2 × I MAX − I MIN / I MAX + I MIN × 100 where I MAX is the maximum intensity of a signal from the titanium in a predetermined zone of the piezoelectric layer as analyzed from the second electrode side in a depth direction by secondary ion mass spectroscopy and I MIN is the minimum intensity of the signal from the titanium in the predetermined zone of the piezoelectric layer as analyzed from the second electrode side in the depth direction by secondary ion mass spectroscopy, wherein the predetermined zone (α) is defined as a portion of the piezoelectric layer excluding a depth from a first intersection to 10% of a zone (β) of the piezoelectric layer and a depth from a second intersection to 10% of the zone (β), where the first intersection is an interface between the piezoelectric layer and the second electrode, the second intersection is an interface between the piezoelectric layer and the first electrode, and the depth of the zone (β) is a distance between the first intersection and second intersection, as determined from the intensity of a signal of niobium. wherein the unevenness of titanium in the piezoelectric layer is indicated by a U-value and the U-value is 140% or less and satisfies the following formula: U = 2 × I MAX − I MIN / I MAX + I MIN × 100 where I MAX is the maximum intensity of a signal from the titanium in a predetermined zone of the piezoelectric layer as analyzed from the second electrode side in a depth direction by secondary ion mass spectroscopy and I MIN is the minimum intensity of the signal from the titanium in the predetermined zone of the piezoelectric layer as analyzed from the second electrode side in the depth direction by secondary ion mass spectroscopy, wherein the predetermined zone (α) is defined as a portion of the piezoelectric layer excluding a depth from a first intersection to 10% of a zone (β) of the piezoelectric layer and a depth from a second intersection to 10% of the zone (β), where the first intersection is an interface between the piezoelectric layer and the second electrode, the second intersection is an interface between the piezoelectric layer and the first electrode, and the depth of the zone (β) is a distance between the first intersection and second intersection, as determined from the intensity of a signal of niobium.