How old do you have to be to legally drive a dirt bike on the road?

You need a license and your bike has to be registered which you can only do with a street legal bike or a KTM