Shortening a barrel to anything under 18 inches results in a prohibited device and you go to jail. Overall length does not matter in this case. And a gunsmith cannot do it for you either. Starting with a manufactured barrel of under 18 inches on an otherwise nonrestricted gun is the same thing. You cannot shorten it by any amount since it's already starting out that short. Mind you no one will bat an eye if it needs a little skim to re-crown it. Just don't "skim" a measurable amount so that the difference is easily measured with a ruler or tape measure.
So if you want a short barrel you must buy one that is manufactured to the length you want.