Why two goods are of different types of Cross Elasticity if we swap them in formula? I am using this formula for calculating Cross elasticity of demand:

$ E_{XY}^D = \Large\frac{(Q_2^X - Q_1^X)(P_2^Y + P_1^Y)}{(Q_2^X + Q_1^X)(P_2^Y - P_1^Y)}
$


If $E_{XY}^D$ > 0 Then goods X and Y are substitutes.
If $E_{XY}^D$ &lt; 0  Then goods X and Y are complementary.
If $E_{XY}^D$ = 0 Then goods X and Y are independent.




I have this data:



P1 and P2 are prices; Q1 and Q2 are quantities.

Using above formula I have calculated cross elasticity $E_{XY}$ and $E_{YX}$ in Excel:




I calculated Cross Elasticity for X and Y and the goods turned out to be Complementary goods, but when I swapped X and Y and calculated using the same formula the goods X and Y become Substitutes.



Why two goods belong to one type of cross elasticity, but if we swap X and Y and plug values into formula the goods turn out to be another type of Cross Elasticity. Can two goods be considered substitutes and complementary at the same time? Isn't it illogical?



Excel file with data and calculations available here: Dropbox
The cross elasticity of demand $E_{XY}^D$ is defined as the percent change in quantity demanded for X divided by the percent change in price of Y, holding the price of X fixed.

The problem with your calculation is that you did not use the quantity change when the price is fixed. Therefore, you need additional data to calculate the cross elasticities.

Another part of your question is whether cross price elasticities are symmetric. The answer depends on what type of demand you are working with. For Hicksian demand (where we hold the utility constant), the cross elasticities are symmetric. For Marshallian demand (where we hold the income constant), cross price elasticities are generally different, even the signs could be different. The reason that the Marshallian demand has different cross price elasticities is that when price of a good changes, it has both price effect (self and cross) and income effect (self and cross). The "pure" cross price effect should be symmetric, which is what we see in Hicksian demand. But the "gross" cross price effect, the combined effect of price and income, is not symmetric, because the income effects caused by different goods can be very different. For more details about Hicksian and Marshallian demand, price and income effects, consult any decent intermediate micro textbook. Or probably Google will show you plenty lecture notes on these topics.