Do you mean driveshaft? They're different lengths based on engine/tranny combo. You can match yours at a junkyard (any year, just same engine/tranny) to get a shaft. they run about $25 here, plus cost of new joints. Unless there's a tag on the diff, the easiest way is the jack up one tire and count yoke rotations per 2 tire rotations as mentioned before. If you want to be REALLY sure you can pop the diff cover and count teeth but that's more involved with fluid, RTV and such.
Yes, driveshaft. It came with 2 front driveshafts and a rear driveshaft in the cargo area. The rear driveshaft is a little longer than what is on it now. One of the front drivelines looks cut shorter and welded back to the yoke. I plan to install one of them this week. I just changed fluids in both axles but didn't look at what gears were in it. Didn't think much about it until recently. I plan to do the wheel spin and count revolutions to make sure front and rear match.
89 XJ 4x4 3" Pro Comp, 4.0, AX15
bought 8/7/16 so still learning