The disclosure relates to aryl amide compounds of formula (I) which are useful as inhibitors of voltage-gated sodium channels, wherein the variables shown in formula (I) are as defined in the specification. The disclosure also relates to pharmaceutically acceptable compositions comprising these compounds and their use for treating or lessening the severity in a subject of one or more of acute, chronic, neuropathic, or inflammatory pain, arthritis, migraine, cluster headaches, trigeminal neuralgia, herpetic neuralgia, general neuralgias, epilepsy or epilepsy conditions, neurodegenerative disorders, psychiatric disorders such as anxiety and depression, dipolar disorder, myotonia, arrhythmia, movement disorders, neuroendocrine disorders, ataxia, multiple sclerosis, irritable bowel syndrome, incontinence, visceral pain, osteoarthritis pain, postherpetic neuralgia, diabetic neuropathy, radicular pain, sciatica, back pain, head or neck pain, severe or intractable pain, nociceptive pain, breakthrough pain, postsurgical pain, cancer pain, stroke, cerebral ischemia, traumatic brain injury, amyotrophic lateral sclerosis, stress- or exercise induced angina, palpitations, hypertension, migraine, or abnormal gastro-intestinal motility.