Short answer: skill. Almost entirely skill.
There is no dice roll in tic tac toe. No shuffled deck. No random number generator deciding who gets the better starting position. Every single outcome is the direct result of the choices both players make. That makes tic tac toe, in the strict game theory sense, a game of pure skill.
But if you have ever lost a game and thought "that felt like bad luck", you are not imagining it. Here is what is actually going on.
The luck you are feeling is your opponent's mistakes, not chance
When two perfect players face off, tic tac toe is genuinely boring. One analysis of over 10,000 games found that optimal play between two skilled players ends in a draw 91% of the time. The remaining outcomes only happen because someone made an error.
Against a beginner, the numbers shift a lot. The same analysis found that an optimal player beats a novice around 76% of the time, with draws making up most of the rest. The win is not luck. It is the gap in skill becoming visible.
So when you lose unexpectedly, what feels like bad luck is usually one of two things. Either you made a mistake without realising it, or your opponent made a good move you did not see coming. Neither of those is chance. Both are skill, just not evenly distributed between the two of you.
Going first is an advantage, but it is not luck either
Whoever goes first in tic tac toe has a real edge. Taking the centre square early gives you more control over the board and more ways to set up a fork later. The second player is always playing defence, hoping the first player slips up.
This sounds like it might be luck (who decided who goes first?) but the advantage itself is pure strategy once the game starts. Whoever wins the coin flip for first move did get lucky in that one decision. Everything that happens after that is skill.
Why it can still feel random when you are new
There is a good explanation for why tic tac toe feels like a luck-based game when you are a kid and stops feeling that way once you understand it.
Writer Tom Keith made an interesting observation about this: every enjoyable game has some element of luck in it, even ones that look like pure skill. For a child still learning tic tac toe, the moves genuinely feel unpredictable because they have not yet built a mental model of what works. Once they figure out the strategy (take the centre, then a corner, then build a fork) the unpredictability disappears, and so does most of the fun, at least against an opponent of equal skill.
This is part of why tic tac toe is mostly a children's game. The skill ceiling is low enough that two competent adults will draw every single time, which removes the tension that made it fun in the first place.
What about against the computer?
This is where it gets completely unambiguous. The Hard mode on TicToe.org runs the minimax algorithm, which calculates every possible outcome of the game before making a move. There is no randomness in its decision making at all. If you lose to it, it is not because you got unlucky. It is because at some point you played a move that gave it an opening, and it took it with mathematical certainty.
You can read more about exactly how the minimax algorithm works if you want to understand why it never makes a mistake.
So is it luck or skill?
Tic tac toe is one of the purest skill-based games that exists, right alongside chess and Go in terms of having zero random elements. The reason it sometimes feels like luck comes down to one thing: the skill gap between you and your opponent, and whether that gap is visible to you in the moment.
Play someone who does not know the strategy yet and you will win almost every time. Play someone who knows it as well as you do and you will draw almost every time. Neither outcome has anything to do with chance. It is skill, all the way down, just sometimes hard to see when you are the one losing.
Sources
- Is tic tac toe a game of luck? - 33rd Square, win rate data across skill levels
- Luck and skill in games - Tom Keith, on why all enjoyable games need some unpredictability
- Game theory in tic tac toe - Cornell Networks course blog
- How the minimax algorithm works - TicToe.org, why the Hard mode never makes mistakes