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.