Depends on the position.
How many moves until you think?

If opponent under 1700, I stay in book a long time....like 10 moves or more.....if opponent over 1800, I get out of book as soon as possible....that is how I manage to beat a few 1800-2000 players, but over 2000 is just beyond my ken. 1700-1800 somewhere in the middle. In general you probably want to stay in book for opponents lower than you, but get out of it for higher rated players soon, the theory being that the higher rated players are higher rated because they study more.....

I follow my line till 4th move. Then que sera sera after that. I like to explore new ones and throw off players within my rank. I noticed that better players (1700 +) can adapt to such unorthodox opponents like me and beat you at mid or end games.

No I'm not talking about using ref material. When is that ever allowed during a game?
Good stuff @bb_gum234, really like your first response.

No I'm not talking about using ref material. When is that ever allowed during a game?
Good stuff @bb_gum234, really like your first response.
In chess.com "daily" games (where the time limits are 1 or more days to make a move) you're allowed to use reference material.
Glad my first response was on the mark though
I had no idea
Do you consider your 2nd, 3rd or 4th move? Assuming you have decided to play X opening, how many moves will you make before you consider ignoring book moves?