These pages are taken from the Hyperphysics Website which is the best online textbook for us to use.
The Magnetic field of a straight wire and the equation for solving problems associated with it is here
Download B Field of a wire Part 1
Download B Field of a wire Part 2
And the same for a solenoid is here