Length Formula for $C^1$ Paths