According to one embodiment, a pressure sensor includes a film part, and a sensing unit. A circumscribing rectangle circumscribing a configuration of a film surface of the film part has a first side, a second side, a third side connected to one end of the first side and one end of the second side, a fourth side connected to one other end of the first side and one other end of the second side, and a centroid of the circumscribing rectangle. The circumscribing rectangle includes a first region enclosed by the first side, line segments connecting the centroid to the one end of the first side, and to the one other end of the first side. The sensing unit includes sensing elements provided on a portion of the film surface overlapping the first region. Each sensing element includes a first, second magnetic layers, and a spacer layer.