Gram to Cup

40 grams of all-purpose flour to cups

40 g of all-purpose flour is about 0.33 cups, which is roughly 1/3 cup or 5.33 tablespoons. That comes from 120 g per US cup. Assumes spoon-and-level. Scooped flour runs closer to 140 g a cup.

Measure40 g of all-purpose flour
Cups0.33
Kitchen measure1/3 cup
Tablespoons5.33
Grams per cup used120 g

Flour is the ingredient where cup measuring goes wrong most often. It compresses easily, so the same cup can hold anywhere from 120 g when spooned in gently to 145 g when the cup is dipped straight into the bag. That swing is about two extra tablespoons, enough to turn a chewy cookie dry or a tender cake dense.

Result
0.83 cups
About 7/8 cup of all-purpose flour. 100 g is 3.53 oz by weight.
Assumes spoon-and-level. Scooped flour runs closer to 140 g a cup.

Questions

How many cups is 40 g of all-purpose flour?
0.33 cups, or about 1/3 cup. That is worked out at 120 g per US cup, and a cup of all-purpose flour can run 120 to 145 g depending on how the cup is filled.
How many tablespoons is 40 g of all-purpose flour?
About 5.33 tablespoons, since one US cup is 16 tablespoons. For small amounts tablespoons are usually the more accurate measure to work with.
Why does 40 g give a different number of cups for other ingredients?
Because cups measure volume and grams measure weight. 40 g of all-purpose flour is 0.33 cups at 120 g per cup, while the same 40 g of a denser or lighter ingredient fills a different amount of space.

Other amounts of all-purpose flour

24 g25 g28 g30 g32 g33 g35 g39 g45 g50 g

See all all-purpose flour conversions or 40 g of every other ingredient.