Problem in X and Y-axis dimensions 3d printing is a fun hobby for me. The  problem that I face is deviation in X or Y axis dimensions. When I print something with specific dimensions there is 0.7 or 0.4 mm difference (smaller in X or Y dimension) when I compare it with the design. Even when I print a cylinder, it is oval. I don't have a problem with the Z-axis. My 3D printer is a Prusa i3.

How can I fix this problem? 


Can I solve it it through the software? 
Do I have to change something of the hardware of the printer?
Usually uneven dimensions in X and Y directions are a result of improper belt tension of one of your belts. With improper belt tension, the positioning of the printer head is less accurate and typically results in non-circular prints. You should check the belt tension and adjust the tension, not too sloppy, and not too much tension (as it stresses the stepper motor which can lead to missing micro steps).

Furthermore, the uneven dimensional differences you mention (are these values you mention for similar sized dimensions? e.g. is this measured on a test cube print), if they are smaller than the design, and if it is a complex design, can also be related to shrinkage, e.g. ABS is a well known material that shrinks. Plastic shrinkage is basically the same in all directions, but complex shapes could introduce stresses preventing even shrinkage in all directions. To counteract shrinkage, you should slice your model scaled, e.g. scale to 102% to counteract a 2% shrinkage.

If the belts check out right and you are printing in PLA, you may want to check the steps per mm value. This calibration is only useful when you print a test cube at e.g. 200%, the inaccuracies also increase with the same ratio. If not, than it is a positioning error, caused by some play in the machine. Please check the bearings.