How to calculate the wind variation?
Sure it can.  It's just vector math. 

$$\vec{A} + \vec{B} = \vec{C}$$

If $\vec{C}$ is your ground speed vector and $\vec{A}$ is your airspeed vector (magnetic heading with true airspeed as a magnitude, then $\vec{B}$, the wind vector, can be solved for by

$$\vec{B} = \vec{C}- \vec{A}$$

Electronic flight computers and E6B apps for tablet computers/smartphones can do the same thing.  But it's nice to have some basic skills with a whiz wheel.