Skip to content
OddMaths
Back to Everyday Mathseveryday maths

The Handshake Problem: 30 People, How Many Handshakes?

Everyone at a party shakes hands with everyone else, once. How many handshakes is that? The obvious count is exactly double the right answer, and seeing why is the whole trick.

At a party, everybody shakes hands with everybody else, once. That sounds like a lot of handshakes, and it is. But there is a super-quick way to count them.

Here's the puzzle:

There are 30 people at a party. Everyone shakes hands with every other person, exactly once. Nobody shakes their own hand.

How many handshakes happen in total?

Have a guess before you read on. 30? 100? 1,000?

Stop and Think

Hint 1: Start small. With 2 people, there is 1 handshake. How many with 3 people? With 4?
Hint 2: How many hands does one person shake at the 30-person party?
Hint 3: If you add up everybody's handshakes, does each handshake get counted once, or more than once?

Start Small

Let's look at tiny parties first.

2 people → 1 handshake
3 people → 3 handshakes (A–B, A–C, B–C)
4 people → 6 handshakes
5 people → 10 handshakes

Notice how fast it grows. Each new guest has to shake hands with everyone already there, so the total goes up by 2 (the 3rd guest), then 3 (the 4th guest), then 4 (the 5th guest)...

The Tempting (Wrong) Answer

At the party of 30, each person shakes 29 hands (everyone except themselves). So:

30 people × 29 handshakes each = 870

Sounds right! But think about it: when Ali shakes Bo's hand, that's one handshake. It gets counted in Ali's 29... and again in Bo's 29. Every handshake involves two people, so it's been counted twice.

To fix it, just halve the count:

870 ÷ 2 = 435 handshakes

That's the answer: 435.

The Rule

For any number of people (call it n), each person shakes n − 1 hands, and every handshake is counted twice. So:

Handshakes = n × (n − 1) ÷ 2

We checked this by computer by listing every pair for parties of 1 to 200 people, and it always matches. Some more examples:

5 people → 5 × 4 ÷ 2 = 10
10 people → 10 × 9 ÷ 2 = 45
20 people → 20 × 19 ÷ 2 = 190
100 people → 100 × 99 ÷ 2 = 4,950

Look at that growth! Doubling the party from 10 to 20 people more than quadruples the handshakes (45 to 190).

A Second Way: Add Them Up

There's another way to see 435. The first person shakes 29 new hands. The second person has already shaken the first one's hand, so they have 28 new ones. The third has 27, and so on, all the way down to 0 for the last person.

29 + 28 + 27 + ... + 2 + 1 = 435

Same answer! Counting in two different ways and getting the same result is a classic maths trick, and it's a good check that we haven't made a mistake.

It's Not Just About Handshakes

The same counting works anywhere every pair matters:

Sports tournaments where every team plays every other team once
Group chats, where you can count how many two-person conversations are possible
High-fives, fist bumps and any other greeting between two people

Try It Yourself

Round robin. Eight teams play each other once. How many matches is that?

High-fives. Your class has 25 people and everyone high-fives everyone else once. How many high-fives?

Work backwards. At a different party there were exactly 45 handshakes. How many people were there?

Check your answers: 8 teams play 8 × 7 ÷ 2 = 28 matches. A class of 25 makes 25 × 24 ÷ 2 = 300 high-fives. And 45 handshakes means 10 people, because 10 × 9 ÷ 2 = 45.

The OddMaths Takeaway

When you count things in pairs, it's easy to count each pair twice. The trick is to ask: does this pair get counted from both sides? If it does, divide by 2.

A party of 30 people means 435 handshakes, because each new guest shakes hands with everybody who is already there.

🎯 Test Your Skill

Hands up for some counting!