The short answer
Finished compost is dark brown or nearly black, crumbly, and smells earthy. The pile has stopped heating, and you cannot easily recognise the original scraps. Most piles show several of these signs at once, rather than one clear moment.
Look at the colour and texture
Finished compost is dark, often brown to nearly black, and it feels loose and crumbly in your hand. It should not look slimy or stick together in a dense clump. Some pieces may still be recognisable, such as twigs or the woody parts of stems, and that is normal.
Smell it
Finished compost smells earthy, like a forest floor. A sour, rotten or ammonia smell means the pile is not finished, and it is usually too wet, too dry or short of air. If the smell persists, see why does my compost smell for likely causes.
Check the temperature
A hot pile heats up as it works. When it cools and stays cool even after you turn it, the pile is nearing the end. Cornell-style extension guidance describes a pile that drops below about 70°F and does not heat again after turning as nearly complete. A drop in temperature alone is not proof, though, since a dry or poorly aerated pile can also cool. Check the other signs too. For how to take the reading, see checking the temperature of a compost pile.
Notice the volume
A pile often shrinks noticeably as it breaks down. Some extension sources say finished compost can be about a third smaller than the original material. If your pile has settled and reduced a lot, that is a good sign. If it has not changed in size for many weeks, it may need more moisture, air or balance.
Test for recognisable scraps
Pull out a handful and look for recognisable scraps, such as banana peel or eggshell. Some small bits left in are normal, but large pieces of food or leaves mean the pile needs more time. If there are only a few woody bits, you can sift them out.
Sift and cure
To make the compost fine and even, pass it through a sieve or a coarse mesh. Put any large, unfinished pieces back into the next pile so they keep breaking down. Some gardeners let finished compost cure for a few weeks in a covered heap, which allows the texture and smell to settle. Keep it dry, or damp but not soaked, until you use it.
When it is slow to finish
If the pile is not showing these signs, it is probably being held back by size, moisture, balance or time. Check why is my compost taking so long, and why is my compost pile not heating up if the pile is still cool and slow. A cold pile in particular can take many months or longer.