From the wiki:
While the map is infinite, the number of blocks the player may walk on is limited. The map, counting air as a block, and not counting blocks beyond and at where block physics fail (32,000,000 from the center) from top to bottom, and all in between, is essentially always 2.62144 × 1017 blocks big. The last point a person may still play normally, which in layman terms the very edge of the map is X/Z: 30,000,000.