Hi Vedat,
From what I've read, you can only calculate magnetic field of a solenoid at any point which is inside a solenoid. However, in a reference I found, It states that the requirement to get magnetic field is that the flux lines are to pass through the solenoid and must return through the space outside. But there is infinite space outside the solenoid, and the returning flux lines are well spread out. Consequently, the magnetic field outside the solenoid, far from its end, is very weak.
Maybe you can use this reference to find your way to get the magnetic field : Sources of Magnetic Fields .
I hope this helps,
Kevin