State mile counts for given route

I looked through, didn’t find the answer. Is there a way to count miles within each state that the given routes will have? For instance, if I’m going from LA to Austin, TX, how many miles will I drive in CA, AZ, NM and TX? This is something that truckers need occasionally need, looking to help a few friends out.