According to one embodiment, a pressure sensor includes a support, a film unit supported by the support, having an upper surface, and capable of being deformed, and a first sensing element provided on the upper surface. The first sensing element includes a first magnetic layer, a second magnetic layer provided apart from the first magnetic layer and a first intermediate unit including a first intermediate layer including a portion provided between the first and second magnetic layers. The first magnetic layer extends in a first direction parallel to the upper surface, and a first major axis length of the first magnetic layer is longer than a first minor axis length. The second magnetic layer extends in a second direction parallel to the upper surface and crossing the first direction, and a second major axis length of the second magnetic layer is longer than a second minor axis length.根據一實施例,壓力感測器包括:支撐;膜單元,係藉由支撐所支撐,具有上表面,及能夠被變形;以及第一感測元件,係設置在上表面上。第一感測元件包括:第一磁層;第二磁層,係設置成與第一磁層分開;以及第一中間單元,其包括包括設置在第一與第二磁層之間的部位之第一中間層。第一磁層延伸在平行於上表面之第一方向上,及第一磁層的第一主軸長度係長於第一次軸長度。第二磁層延伸在平行於上表面且與第一方向相交之第二方向上,及第二磁層的第二主軸長度係長於第二次軸長度。11a‧‧‧第一磁層11b‧‧‧第三磁層12a‧‧‧第二磁層12b‧‧‧第四磁層13au‧‧‧第一中間單元13bu‧‧‧第二中間單元50‧‧‧感測元件50a‧‧‧第一感測元件50b‧‧‧第二感測元件50c‧‧‧第三感測元件50d‧‧‧第四感測元件61‧‧‧第一互連62‧‧‧第二互連70‧‧‧膜單元70c‧‧‧形心70d‧‧‧膜單元70h‧‧‧通孔70r‧‧‧外邊緣70s‧‧‧支撐70u‧‧‧上表面110‧‧‧壓力感測器