Over the past decade, I’ve become an expert on cannabis-infused food products, aka edibles. Years ago, I taught myself how to infuse my own confections and since then, I’ve cooked with top chefs on VICE’s stony cooking show Bong Appétit.

I’ve picked up many techniques and tips along the way, but one of the first things I discovered on my magical, edible journey: The effect feels entirely different from smoking a joint. I realized this pretty quickly after baking my first infused apple pie, emptying an entire jar of cannabutter into my homemade crust. Roughly one hour post-devouring a massive slice—and scrounging for the best caramelized, gooey bits stuck to the pan—it hit me all at once (and not in a good way).

Naturally, this is something you want to avoid when making and enjoying edibles at home. The key to this starts with cannabutter, which is butter that’s been melted and steeped with activated weed. Just about any fat (olive oil, coconut oil, etc.) can be infused with weed, but cannabutter is the most iconic. You can bake and cook with cannabutter (also called weed butter) to infuse all sorts of recipes—from fudgy brownies (a classic choice) to the best spaghetti sauce ever.

While the concept is simple, the process is—by necessity—a methodical one, meaning you’ll want to pay close attention to the steps and quantities at every turn, as well as the dosing. You'll also want to make sure you have access to quality weed from a trusted source (living in a state where it's legally distributed helps).

I recently had the opportunity to get my cannabutter recipe down to an exact science via CW Analytical, a California-based quality assurance testing lab for cannabis products. I worked with their team to run a series of cannabutter experiments (we collected data on four different variables, including butter infusion) and found the most efficient method.

So whether you’re an edible newbie or a seasoned canna-sseur, here’s a step-by-step guide to making weed butter at home, with tips along the way on improving its flavor, using it once it’s ready, and making sure you’re dosing carefully.

Step 1: Gather a few tools & ingredients

In order to make cannabutter at home, you’ll need a few tools and ingredients—some are probably already lying around your kitchen, others you may need to specially stock up on.

For the decarboxylation (more on what that means in a minute):

1 gram of quality cannabis flower

Parchment-lined baking sheet

Scissors (optional)

Wooden spoon

Grinder

For making the cannabutter:

Unsalted butter (use the amount of butter your infused recipe calls for)

1/4 cup water

Small saucepan

Candy thermometer

Fine mesh strainer

Food-safe storage container

Step 2: Use High-Quality Weed

As any chef will tell you, ingredients matter. Whether you’re using a stash rediscovered during your 10-year high school reunion (which imparts a soporific effect) or high-quality weed straight from a dispensary, it will have an impact on the potency and flavor of the final cannabutter.

Most edibles traditionally use cannabutter made with trim or shake, which are the leaves trimmed from the cannabis flowers after harvesting. However, trim and shake have more plant matter, which means they have more chlorophyll; more chlorophyll equals more bitterness in the final product.

Personally, I prefer to cook with hash (also called hashish) or grinder kief, a concentration of the crystal-laden resin in weed. But for simplicity’s sake, start with one gram of quality cannabis flower—this refers to the part of the cannabis plant that has been cultivated, harvested, dried, and cured for smoking.

While a lot of pre-packaged edibles, like the kinds you can buy premade at a dispensary, use the terms "indica" (which refers to a body high) or "sativa" (an active high), that’s more or less a marketing ploy. Why? The terpenes (essential oils of plants) that steer the effects that different strains of weed have on you (body high versus active high) don’t have the same chemical interaction in edible form.

So, when purchasing at the dispensary, focus on the THC and CBD ratios. Below is more information about what both of these do chemically, but here's a general rule of thumb: For a balanced high, I recommend looking for a 1:1 ratio of THC and CBD—this means that for every one milligram of THC there is one milligram of CBD.

If you have a few options to choose from, follow your nose for citrus (limonene), herbal (myrcene), and peppery (caryophyllene) terpenes, then consider whether those flavors pair with the recipe you’re planning to make with the cannabutter.

Step 3: Preheat Your Weed

In its raw form, weed is non-psychoactive. Raw or live cannabis contains the cannabinoids THCA and CBDA. Sound familiar? Remove the A and you have THC (the chemical that gets you high) and CBD (which isn’t psychoactive).

To convert the THCA to THC (and CBDA to CBD), just add heat and time. This process is called decarboxylation. When you light a joint or burn a bowl, you’re decarboxylating the weed, which kickstarts its effects. The higher the heat, the faster the reaction. But when making cannabutter for edibles, using too much heat can produce a taste like burnt popcorn.

There is more than one way to decarboxylate weed, but an oven is the most efficient. Here’s how to do it:

Preheat the oven to 245°F. Break up the flower into smaller pieces using your hands to expose more surface area to the heat; the pieces should break off like florets of broccoli. Spread the broken-up flowers on a parchment-lined sheet pan and bake for 25 to 30 minutes, stirring every 10 minutes. After 20 minutes, roughly 70 percent of the THCA will be converted to THC; after 30 minutes, 80 percent. If this is your first time making cannabutter, I’d recommend a cook time that’s on the lower end of the range. Remove the sheet pan from the oven and let the flowers cool at room temperature. Grind the decarboxylated, cooled flowers using a grinder before moving on to making the cannabutter. They should be ground to medium course—like coffee, not espresso. Use the decarbed, ground cannabis right away.

Step 4: Infuse the Butter

Just like choosing high-quality weed is important, so is choosing your butter. I like to use good butter, unsalted. There’s no need for a fancy-schmancy beurre de baratte, but a high-fat, European-style unsalted butter does the trick.

On to the infusion process: Many cannabutter recipes out there tend to go a bit overboard in this department. Most require a long steep of the already-decarboxylated weed in the butter, anywhere from two to four hours. This certainly infuses the fat with cannabinoids, but it also pulls the chlorophyll and other “green” flavors from the weed, which negatively impact the taste.

Our experiment in the CW Analytical lab found that 80 to 90 percent of cannabinoids (that’s THC and CBD) infused in the butter after 45 minutes to one hour. And brown butter, which makes everything taste better, had an infusion rate of just six minutes due to the higher heat (without any degradation of the cannabinoids).

If you’re making brown cannabutter, you can go from decarb to infused butter in about 30 minutes—that breaks down to 20 or 25 minutes to decarboxylate the weed, plus 6 minutes or so to brown the butter (then it’s ready to strain and set in the fridge). Infused brown butter and bourbon banana bread, here you come.

Ready to make cannabutter? Here the best method for infusing standard butter on the stovetop:

To a small saucepan, add your decarboxylated, ground weed, the amount of butter in your recipe, plus 1/4 cup of water (this helps replace the water that will evaporate). Heat at a low simmer for 45 minutes to 1 hour, using your candy thermometer to make sure the temperature does not exceed 190°F. Remove the saucepan from the heat and pour the mixture through a fine mesh strainer into a food-safe container. (Cheesecloth works too, but it soaks up a lot of precious butter.) Cover and let the butter set in the fridge, then pour off any remaining water.

Step 5: Cook With Your Cannabutter

Now that your cannabutter is activated and infused, the shelf life is shorter than regular butter—about one to two weeks if it’s tightly wrapped. So bake or cook with it (using the same amount of butter the recipe calls for) as soon as possible. You can also freeze it for up to six months. I keep a log of infused butter cookie dough in the freezer, and slice off one cookie’s worth of dough to bake before bedtime every night.

Most edible recipes skip an important note: A significant amount of decarboxylation occurs in the oven during baking. We tested my Aunty Yo’s approach—which is to take store-bought cookie dough and simply mix in raw, ground weed—at the CW Analytical lab. We found that the THC activated up to 35 percent. That’s why we only decarboxylate the weed for 20 to 30 minutes, because the cannabutter’s potency will also increase as it bakes or cooks in the recipe.

Step 6: Easy Dose It

Properly dosing can be tricky for homemade, and even commercially manufactured, edibles. There are a lot of variables to consider, like the potency of your weed, the inevitable loss of weed during the process, and the exact yield of a recipe. My advice? Always eat less of an edible than you think you need. If it’s your first time making them, start with half of a serving to figure out whether the dose is right for you.

Never eat more of an edible without knowing the relative potency and your tolerance—this will ensure you have a positive experience, which is why you’re here in the first place, right?

No matter what, wait at least one to two hours to start feeling the effects of the edible. Two hours might seem like a long time, but because everyone's body chemistry is different, it can take that long. Whatever you do, don’t take more of the edible after just 30 or 45 minutes if you’re not feeling something yet.

If you live in a legal state, you can find out the exact percentage of the THC and CBD in the weed you’re buying to help gauge the potency, but according to Leafly, an average potency is hard to pinpoint.

It takes a little bit of math to figure out the exact dosing/serving size you should start with, but it’s important to do it, no matter what type of edible you’re making. Here’s an example:

1 gram of weed that is 15 percent THCA will have 150 milligrams of THCA.

I recommend a starting dose of 2.5 to 5 milligrams THC.

1 gram of weed in 2 dozen cookies breaks down like this: 150 milligrams THC in the total batch divided by 24 cookies = 6.25 milligrams of THC per cookie.

Start with 1/2 of a cookie, wait 1 to 2 hours to feel the effects, then decide if you want to try a bit more (I'd recommend adding no more than 1/4 of the cookie at a time).

Keep in mind that 100 percent conversion to THC is impossible, since there is always loss during the decarboxylation, infusion, and cooking processes. Just remember to plan ahead with non-infused snacks to munch on once you’ve enjoyed your edible, and don’t forget to set a timer to know how long it’s been since you took it.

Do you have any questions about the infusion process? Let us know in the comments.