# Calculate earths magnetic field?

How do I calculate earths magnetic field at a distance x from earths surface?
Do I have have to think about earth as a dipole and use the rate at the dipole weakens?