Confusion is a base 40 attack with no typing.
with this formula:
[(((2A/5 + 2)B40)/C)/50] + 2
A = the confusion victim's Level
B = the confusion victim's Attack
C = the confusion victim's Defense
That's why pokemon like steelix with high defense don't take much damage from confusion... sucks for you if you have pokemon like hitmonlee or rampardos.
This was already answered.
http://pokemondb.net/pokebase/6385/how-does-confusion-work