The magnetic force acting on the wire (assuming the wire is perpendicular to the magnetic field) is

where I is the current in the wire, L its length, B the intensity of the magnetic field.
In order to levitate the field, this force must be at least equal to the weight of the wire, which is:

Equalizing the two forces, we have

that we can solve to find I, the minimum current in the wire required to levitate it:
