pain management · Advil, Celebrex, Mobic, Ultram

Which Pain Medication Is Right for Me?

The first question is not which painkiller, but which kind. An anti-inflammatory and an opioid are answers to different problems.

Pain medication is the one area where a naive comparison does real harm, because the drugs grouped under the label are not alternatives to one another. Ibuprofen and codeine do different things, for different kinds of pain, with different risks. Ranking them against each other on any single axis produces nonsense.

So the sensible way to read this page is in two halves. First, what kind of pain is being treated, which determines the group. Then, within that group, which member fits you best, and that is where genetics has something concrete to add.

Important: Do not start, stop or change a pain medication without talking to your doctor or pharmacist, and be particularly careful about combining them. Many combination products already contain paracetamol or an anti-inflammatory, so doubling up is easy and can cause liver or kidney injury. Codeine and tramadol should never be given to children after tonsil surgery, and are not recommended while breastfeeding, because of the risk to ultrarapid metabolizers.

2 genes CYP2C9 for the anti-inflammatories, CYP2D6 for the opioids, and they split this class almost perfectly in two

How the choice actually gets made

What kind of pain it is

This decides the group before anything else. Inflammatory and musculoskeletal pain generally responds to anti-inflammatories. Nerve pain often responds poorly to both anti-inflammatories and opioids, and is usually treated with an entirely different class. Acute severe pain after surgery or injury is where opioids have their clearest role. Chronic non-cancer pain is where opioids perform worst relative to their risks.

Getting this wrong is the most common reason a pain medication does not work, and it has nothing to do with genetics.

What your kidneys, stomach and heart can tolerate

Anti-inflammatories carry real constraints. They can raise blood pressure, stress the kidneys, and cause gastrointestinal bleeding, and those risks rise with age, dose and duration. A history of ulcer or of kidney impairment may take the whole group off the table, or require gastric protection alongside. Celecoxib is easier on the stomach but carries its own cardiovascular considerations. These are usually the binding constraints, not efficacy.

How long you need it for

Short courses and long-term use are different decisions. Many anti-inflammatories are reasonable for a few days and problematic for a few months. Opioids raise questions about tolerance and dependence that barely arise over three days and dominate over three months. The right answer for a sprain is often the wrong answer for arthritis.

What else you take

Anti-inflammatories interact with anticoagulants, some blood pressure medications, and each other. Opioids interact with sedatives, and the combination with benzodiazepines is a well-established cause of respiratory depression.

This is also where interactions and genetics collide: several common medications, including some antidepressants, block CYP2D6. If you take one, codeine and tramadol may behave as though you were a poor metabolizer regardless of your genotype, which is a form of phenoconversion.

How your body processes the drug

Within each group, this is where genetics earns a place. For the anti-inflammatories, CYP2C9 governs clearance and slow metabolizers accumulate higher levels at standard doses.[1] For codeine and tramadol, CYP2D6 does something more dramatic: it is required to convert them into the compound that actually relieves pain, so the enzyme determines whether the drug works at all.[2]

That difference is worth dwelling on. For most drugs, metabolism affects how much you get. For codeine, it decides whether you get anything.

Cost and what you can get without a prescription

Several effective anti-inflammatories are inexpensive and available over the counter, which is why they are usually tried first. Opioids require a prescription and, increasingly, a documented rationale. Practical availability shapes this decision more than it does most.

Comparing an opioid against an anti-inflammatory on genetics alone would be a category error. The useful comparison happens within each group.

How your genetics can play a role

The two genes here map almost exactly onto the two groups, which is why a genetic result tends to point you within a group rather than between them.

GeneWhat it affects
CYP2C9 Clears ibuprofen, celecoxib, meloxicam, piroxicam and flurbiprofen.[1] Intermediate and poor metabolizers reach higher concentrations on a standard dose, and because the risks of this group are largely dose-related, that translates into a higher chance of gastrointestinal and kidney problems. Guidance for poor metabolizers is generally to start at a lower dose, or to prefer an anti-inflammatory that does not depend on this enzyme.
CYP2D6 Converts codeine into morphine and tramadol into its active form.[2] Poor metabolizers make little of the active compound and typically get inadequate pain relief, which is often misread as the drug not being strong enough. Ultrarapid metabolizers make too much too quickly and are at risk of dangerous sedation and respiratory depression, which is the basis for the FDA restrictions on codeine in children.[3] For both groups, guidelines recommend a different analgesic rather than a dose adjustment.

The practical consequence is asymmetric. A CYP2C9 result usually adjusts a dose. A CYP2D6 result usually changes the drug, because there is no dose of codeine that works for someone who cannot activate it, and no safe dose for someone who activates it too well.

Notably, several opioids do not depend on CYP2D6 at all, so a poor or ultrarapid result narrows the options without exhausting them.

Want to know how you process codeine and the anti-inflammatories?

A Gene2Rx report reads your own DNA to show how it may affect your response to Ibuprofen and your other medications.

Find out today

Or see an example report first

When to consider pharmacogenetic testing

The clearest case is codeine or tramadol that did nothing at all, which is a classic CYP2D6 poor metabolizer picture and is worth distinguishing from a drug that helped a little but not enough. It is equally relevant in the opposite direction: unusual drowsiness or breathing difficulty on a standard dose warrants urgent attention and is consistent with ultrarapid metabolism.

For the anti-inflammatories the case is softer. A CYP2C9 result is useful mainly if you need an anti-inflammatory long term, or if you have had side effects at doses most people tolerate.

What you can do next

  1. Be precise about the pain itself, because the type determines the group. Burning or shooting pain, pain with numbness, and dull aching pain point to different treatments entirely.
  2. If a pain medication did nothing at all, say so in those words. No effect whatsoever is a different and more informative finding than partial relief.
  3. List every other medication and supplement, including anything bought over the counter. Doubling up on anti-inflammatories or paracetamol through combination products is common and avoidable.
  4. If you have CYP2D6 or CYP2C9 results, bring them. CYP2D6 in particular can change which drug is appropriate rather than just the dose.
  5. Ask your prescriber what the plan is for coming off, especially for opioids, before starting rather than afterwards.
Worked example: pain medications

Pick a set of results to see how the same 10 medications sort differently.

Your genetics don't flag any of these 10 - none is genetically better or worse for you.

Standard dosing Celecoxib, Flurbiprofen, Ibuprofen, Lornoxicam, Meloxicam, Piroxicam, Tenoxicam
Standard dosing Codeine, Oliceridine, Tramadol

A simplified example using hypothetical results, drawn from the same published guidelines as your report. Bands describe how a medication is likely to be dosed or tolerated, not how well it will work for you, and none of this replaces a conversation with your prescriber.

Frequently asked questions

Why did codeine do nothing for me?

The most likely explanation is CYP2D6. Codeine is inactive as taken and has to be converted into morphine by that enzyme. Poor metabolizers convert very little and get correspondingly little relief. A medication you are taking may also be blocking the enzyme, which produces the same result temporarily. Either way, taking more is not the answer.

Is one anti-inflammatory stronger than another?

They are broadly comparable at equivalent doses, and the differences that matter are in side-effect profile and duration rather than raw potency. Celecoxib is gentler on the stomach; some others last longer per dose. Which suits you usually comes down to your kidney, stomach and cardiovascular risk rather than to strength.

Can genetics tell me whether an opioid will be addictive for me?

No. The genes discussed here affect how you metabolise specific opioids, which influences relief and side effects. They do not predict dependence, which is driven by a much wider set of factors that no current test measures reliably. Be sceptical of anything sold on that basis.

Should I be comparing anti-inflammatories against opioids?

Not directly. They treat different problems and carry different risks, so a ranking that mixes them is misleading. The useful comparison is within a group once the type of pain has determined which group is appropriate.

References

  1. CPIC. CPIC Guideline for NSAIDs and CYP2C9 (2020). cpicpgx.org
  2. CPIC. CPIC Guideline for Opioids (Codeine, Tramadol) and CYP2D6, OPRM1, and COMT (2021). cpicpgx.org
  3. U.S. Food and Drug Administration. Table of Pharmacogenomic Biomarkers in Drug Labeling (2024). fda.gov
  4. PharmGKB / Stanford University. PharmGKB: The Pharmacogenomics Knowledge Base. pharmgkb.org

Disclaimer: This content is for educational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always consult your healthcare provider before making changes to your medication. Never stop or change a medication without medical supervision.

← All guides Ibuprofen pharmacogenetics →
Get Your Report Now
Ready in One Minute