A current sensor includes an electric wire to be measured, a guide portion for guiding the electric wire to be measured, a holding portion for holding the electric wire to be measured, and four pairs of magnetic sensor elements arranged at intervals of 90 degrees along a circumference around a center axis which is a virtual arrangement axis of the electric wire to be measured. The outputs of the magnetic sensor elements of each pair are appropriately linearly combined and the linearly combined outputs of all the pairs are added. Hence, a space for guiding the electric wire to be measured can be easily allocated, and the effects of variation sources such as the displacement of the electric wire to be measured, a constant external magnetic field, and an external magnetic field generated by a neighboring electric wire are compensated for, whereby a small high-accuracy current sensor is provided.