I lucked out, and this trailer had a 40' sticker on the side, so I didn't need to measure. I put it in the 4th hole at the shipper, scaled it a few miles away after getting loaded in Louisiana, and it was legal both on weight and length (hooray! first try!). Thanks for all the tips everyone for future reference as I'm sure they'll come in handy. Also, for anyone else looking to this thread for help, this is a Wabash trailer, and I could MAYBE go back to the 5th hole and have the rear axle lined up exactly at the 40' mark. As it sits now, it's slightly in front of the mark, so I can't verify for certain that moving it back one more hole wouldn't put it slightly behind the mark. This is counting the holes from the very first hole with the bar in it. Hopefully this thread can help some others as well who haven't had to deal with California before.
10 feet from the rear of the trailer to the center of the rear axle. After awhile you'll learn to pace it off.
It's great when the trailer is marked. But, you need to understand how to do it yourself. California isn't the only state with a tandem law, just the tightest. Others are at 41 feet, some to the center of the axle group, instead of the axle.