user4226: I sometimes find it very difficult to determine the accurate moves in middle game. When a tough opponent is in front of me I dont let to attack at first. I strengthen my defense. But if I ever try to attack, the opponent destroys my defense and I fail! Sometimes I feel this is the right move and also understand the consequence of the move! But still there remain quirks on my move and the opponent take the advantage! I even find it difficult to calculate moves as there are so many possibilities for an opponent!  So i want to know how to determine the accurate moves as the grandmasters do and also how many moves should I calculate before any move?

[White "NN"]
[Black "user4226"]
[StartFlipped "1"]
     [FEN ""]

1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Bc5 5. a3 d6 6. b4 Bb6 7. Bxc6+ bxc6 8. h3 O-O 9. Bb2 a5 10. O-O Be6 11. Nbd2 Nh5 12. Nxe5 dxe5 13. Qxh5 f6 14. Rad1 axb4 15. axb4 Ra2 16. Rb1 Bd4 17. Bxd4 Qxd4 18. Rfc1 Rb2 19. Rxb2 Qxb2 20. Qd1 Qxb4 21. Rb1 Qe7 22. Rb7 Qd7 23. Nb3 Bxb3 24. Rxb3 f5 25. exf5 Qxf5 26. f3 Rd8 



user1761: Based on the way your question is written, I think your problem is that you think only about "attacking" and "defending", not about the targets what you should attack or defend. If you try hard to do something that your position is not good for, you end up making your position worse even if you calculate perfectly.
I don't know your playing strength, but I think I improved from ~1400 to ~1600 in a month just by reading IM Jeremy Silman's "The Amateur's Mind". It taught me one thing: you need to have an idea what you want to achieve in the position before you start calculating. So plans in chess are not series of moves moves but rather something like "I wan't to attack that weak pawn so he has to defend it and then I can use my more active pieces to attack that other weak square there."
I'm not claiming Silman's thinking technique is excellent. Now (as a ~2000 player) I use it for analyzing games and training with unlimited time, but in games I use it mostly to determine weaknesses and strengths of both sides in the position. I've found the actual technique to be too unpractical ("ideological" as @firtydank says in his answer) for real games. For example, he says somewhere that if you have 60 minutes on the clock, it's OK to spend 45 minutes trying to come up with a plan, because once you have a plan, you instantly know what to do in the next moves. My experience tells that around 90 % of the time, my opponent's move is completely unpredicted by me, and around 50 % of the time, it ruins my previous plan, and I have to come up with a new one.
However, here's the main point of my answer: If my original plan was somewhat sensible, my opponent needs to take it into account, and thus he can't do whatever he likes, and I have good chances of winning the game, even if I have to find a new plan each move. If my original plan is totally useless, my opponent doesn't need to care about it and will be able to do whatever he wants, most likely winning the game. Often it looks like I've made a tactical error, allowing him to attack, but I think tactical and strategical errors go somewhat hand in hand: it is easy to miscalculate if you are under pressure, and it's easy to miss opponent's attacking chances if you don't know that he has a good position for attacking because your pieces are not putting any pressure on his position.

user1816: Chess is a skill that requires hard work and dedicated toning, just like learning to play a musical instrument. Unless you are very exceptional, you won't become a master at it within a few weeks, months or years (the good news is that you don't have to be a master to have fun with chess). Some players were lucky enough to be very talented, had the opportunity to start young and maintained an almost obsessive interest in it - they are the ones most likely to become IM's or GM's after 10 to 15 year of dedication. Most of us just play for fun and must maintain a realistic perspective.
I suggest you read Willy Hendriks' book "Move First, Think Later". The book addresses the very essence of your question, which is: How do I improve my chess?
As a warning, the book is controversial, especially since it spends a lot of effort in undermining certain common conceptions about chess improvement. Hendriks is not scared of taking on the establishment of chess training.
From memory, here is a list of things he suggests you focus on:

Tactical puzzles. Nothing improves your chess quicker than doing a lot (as in thousands) of puzzles, as it "programs" your brain to spot good moves and continuations.
Play a lot. Over the board, on the internet, as much as you have an appetite for.
Notate and study your games. Try to understand where you went wrong (I, for example, found I have a weakness in spotting tactics on my king behind the pawn line).
Focus on the things that motivate you. For example, here on chess.SE you will often see the advice "don't study opening theory at beginner level". Well, if you like studying opening theory, then studying opening theory is perfectly fine.

Here is a list of things he suggests you don't waste your time on:

Worrying about general rules and common adages (for example "the bishop pair", "respond to an attack on the flank with an attack in the center", leave your thinking time for the "critical moment")
Approaching chess from some ideological/academic angle (like Silman's "imbalances"). Hendriks argues that chess ability is not a rational skill, and a rational-based approach will not help in improving it greatly (this point probably needs some elaboration - he's not saying chess is irrational, but that taking some kind of reasoned approach won't help you much - you are going to be better off with an intuition toned through practice than over-the-board reasoning). 
Worrying about developing some kind of structured thought process (for example: 1. Consider threats. 2. Consider attack points. 3. Consider tactical motifs. 4. Consider alternatives etc etc). Hendriks argues from findings in neuroscience that your brain functions heavily in parallel - don't try to serialize your thinking by adopting a thought process that sub-divides goals - instead, let your brain do its work naturally. Just find the good move!
Trying to calculate every position 10 moves deep. GM's don't generally calculate that deep (unless the tactical situation calls for it, of course).
Following some abstract "plan". Rather, focus on finding good squares for you pieces and making good moves that forces your opponent to counter actively.
Spending 10,000 hours doing it even if you hate it.


4226: <p>I sometimes find it very difficult to determine the accurate moves in middle game. When a tough opponent is in front of me I dont let to attack at first. I strengthen my defense. But if I ever try to attack, the opponent destroys my defense and I fail! Sometimes I feel this is the right move and also understand the consequence of the move! But still there remain quirks on my move and the opponent take the advantage! I even find it difficult to calculate moves as there are so many possibilities for an opponent!  So i want to know how to determine the accurate moves as the grandmasters do and also how many moves should I calculate before any move?</p>

<pre><code>
[White "NN"]
[Black "user4226"]
[StartFlipped "1"]
     [FEN ""]

1. e4 e5 2. Nf3 Nc6 3. Bb5 Nf6 4. d3 Bc5 5. a3 d6 6. b4 Bb6 7. Bxc6+ bxc6 8. h3 O-O 9. Bb2 a5 10. O-O Be6 11. Nbd2 Nh5 12. Nxe5 dxe5 13. Qxh5 f6 14. Rad1 axb4 15. axb4 Ra2 16. Rb1 Bd4 17. Bxd4 Qxd4 18. Rfc1 Rb2 19. Rxb2 Qxb2 20. Qd1 Qxb4 21. Rb1 Qe7 22. Rb7 Qd7 23. Nb3 Bxb3 24. Rxb3 f5 25. exf5 Qxf5 26. f3 Rd8 
</code>
</pre>
 1761: <p>Based on the way your question is written, I think your problem is that you think only about "attacking" and "defending", not about the targets what you should attack or defend. If you try hard to do something that your position is not good for, you end up making your position worse even if you calculate perfectly.</p>

<p>I don't know your playing strength, but I think I improved from ~1400 to ~1600 in a month just by reading IM Jeremy Silman's "The Amateur's Mind". It taught me one thing: you need to have an idea what you want to achieve in the position before you start calculating. So plans in chess are not series of moves moves but rather something like "I wan't to attack that weak pawn so he has to defend it and then I can use my more active pieces to attack that other weak square there."</p>

<p>I'm not claiming Silman's thinking technique is excellent. Now (as a ~2000 player) I use it for analyzing games and training with unlimited time, but in games I use it mostly to determine weaknesses and strengths of both sides in the position. I've found the actual technique to be too unpractical ("ideological" as @firtydank says in his answer) for real games. For example, he says somewhere that if you have 60 minutes on the clock, it's OK to spend 45 minutes trying to come up with a plan, because once you have a plan, you instantly know what to do in the next moves. My experience tells that around 90 % of the time, my opponent's move is completely unpredicted by me, and around 50 % of the time, it ruins my previous plan, and I have to come up with a new one.</p>

<p>However, here's the main point of my answer: If my original plan was somewhat sensible, my opponent needs to take it into account, and thus he can't do whatever he likes, and I have good chances of winning the game, even if I have to find a new plan each move. If my original plan is totally useless, my opponent doesn't need to care about it and will be able to do whatever he wants, most likely winning the game. Often it looks like I've made a tactical error, allowing him to attack, but I think tactical and strategical errors go somewhat hand in hand: it is easy to miscalculate if you are under pressure, and it's easy to miss opponent's attacking chances if you don't know that he has a good position for attacking because your pieces are not putting any pressure on his position.</p>
 1816: <p>Chess is a skill that requires hard work and dedicated toning, just like learning to play a musical instrument. Unless you are very exceptional, you won't become a master at it within a few weeks, months or years (the good news is that you don't have to be a master to have fun with chess). Some players were lucky enough to be very talented, had the opportunity to start young and maintained an almost obsessive interest in it - they are the ones most likely to become IM's or GM's after 10 to 15 year of dedication. Most of us just play for fun and must maintain a realistic perspective.</p>

<p>I suggest you read Willy Hendriks' book "Move First, Think Later". The book addresses the very essence of your question, which is: How do I improve my chess?</p>

<p>As a warning, the book <em>is</em> controversial, especially since it spends a lot of effort in undermining certain common conceptions about chess improvement. Hendriks is not scared of taking on the establishment of chess training.</p>

<p>From memory, here is a list of things he suggests you focus on:</p>

<ul>
<li>Tactical puzzles. Nothing improves your chess quicker than doing a lot (as in thousands) of puzzles, as it "programs" your brain to spot good moves and continuations.</li>
<li>Play a lot. Over the board, on the internet, as much as you have an appetite for.</li>
<li>Notate and study your games. Try to understand where you went wrong (I, for example, found I have a weakness in spotting tactics on my king behind the pawn line).</li>
<li>Focus on the things that motivate <em>you</em>. For example, here on chess.SE you will often see the advice "don't study opening theory at beginner level". Well, if you <em>like</em> studying opening theory, then studying opening theory is <em>perfectly fine</em>.</li>
</ul>

<p>Here is a list of things he suggests you don't waste your time on:</p>

<ul>
<li>Worrying about general rules and common adages (for example "the bishop pair", "respond to an attack on the flank with an attack in the center", leave your thinking time for the "critical moment")</li>
<li>Approaching chess from some ideological/academic angle (like Silman's "imbalances"). Hendriks argues that chess ability is not a rational skill, and a rational-based approach will not help in improving it greatly (this point probably needs some elaboration - he's not saying chess is <em>irrational</em>, but that taking some kind of <em>reasoned</em> approach won't help you much - you are going to be better off with an intuition toned through practice than over-the-board reasoning). </li>
<li>Worrying about developing some kind of structured thought process (for example: 1. Consider threats. 2. Consider attack points. 3. Consider tactical motifs. 4. Consider alternatives etc etc). Hendriks argues from findings in neuroscience that your brain functions heavily in parallel - don't try to serialize your thinking by adopting a thought process that sub-divides goals - instead, let your brain do its work naturally. Just find the good move!</li>
<li>Trying to calculate every position 10 moves deep. GM's don't generally calculate that deep (unless the tactical situation calls for it, of course).</li>
<li>Following some abstract "plan". Rather, focus on finding good squares for you pieces and making good moves that forces your opponent to counter actively.</li>
<li>Spending 10,000 hours doing it even if you hate it.</li>
</ul>
