A power transmitting device comprising: a power transmitting coil (51, 52) configured to contactlessly transmit electric power to a power receiving coil in a state where the power transmitting coil (51, 52) faces the power receiving coil, the power transmitting coil (51, 52) including a first power transmitting coil and a second power transmitting coil having the same number of turns, the first power transmitting coil (51, 52) being provided so as to surround a winding axis extending in a winding axis direction that intersects with a facing direction in which the power transmitting coil (51, 52) faces the power receiving coil, the second power transmitting coil being electrically connected to the first power transmitting coil and arranged next to the first power transmitting coil in the winding axis direction with a gap from the first power transmitting coil; and a switching device (SW1, SW2, SW3) configured to, when the power receiving coil is a solenoid coil, connect the first power transmitting coil and the second power transmitting coil in parallel with each other such that first magnetic flux generated inside the first power transmitting coil and second magnetic flux generated inside the second power transmitting coil flow in the same direction along the winding axis, and the switching device (SW1, SW2, SW3) configured to, when the power receiving coil is a circular coil, connect the first power transmitting coil and the second power transmitting coil in series with each other such that the first magnetic flux and the second magnetic flux flow in opposite directions along the winding axis. a power transmitting coil (51, 52) configured to contactlessly transmit electric power to a power receiving coil in a state where the power transmitting coil (51, 52) faces the power receiving coil, the power transmitting coil (51, 52) including a first power transmitting coil and a second power transmitting coil having the same number of turns, the first power transmitting coil (51, 52) being provided so as to surround a winding axis extending in a winding axis direction that intersects with a facing direction in which the power transmitting coil (51, 52) faces the power receiving coil, the second power transmitting coil being electrically connected to the first power transmitting coil and arranged next to the first power transmitting coil in the winding axis direction with a gap from the first power transmitting coil; and a switching device (SW1, SW2, SW3) configured to, when the power receiving coil is a solenoid coil, connect the first power transmitting coil and the second power transmitting coil in parallel with each other such that first magnetic flux generated inside the first power transmitting coil and second magnetic flux generated inside the second power transmitting coil flow in the same direction along the winding axis, and the switching device (SW1, SW2, SW3) configured to, when the power receiving coil is a circular coil, connect the first power transmitting coil and the second power transmitting coil in series with each other such that the first magnetic flux and the second magnetic flux flow in opposite directions along the winding axis.