Short answer
Work outwards from what you cannot change. Identify the fixed elements in the room — flooring, worktops, a fireplace, large furniture you are keeping — establish whether they read warm or cool, then choose a wall colour that belongs to the same temperature family. Only then narrow down the exact shade, and test it large and in place before committing.
Almost every disappointing wall colour is a colour that was chosen first and then asked to work with everything else in the room. Fixed materials are the constraint, not the wall: a floor cannot be adjusted by half a shade, whereas paint can. Starting from the constraint means the shortlist you build is already viable, so the remaining decision is aesthetic rather than a gamble.
Flooring, worktops, tiles, a fireplace surround, built-in joinery, large upholstery. These set the room's temperature and depth whether you plan around them or not.
Hold a sheet of plain printer paper against each one. Against a true white, a warm material shows yellow, orange or red; a cool one shows grey, blue or pink. This is far more reliable than judging from memory, because the eye adapts to a room and stops registering its overall cast.
North-facing rooms in the Northern Hemisphere receive cool, indirect light all day, which drains warmth from colours. South-facing rooms receive warm direct light that intensifies them. This determines how much warmth a colour needs to carry to survive the room.
Decide whether you want the walls pale, mid-toned or deep. Depth affects how a room feels far more than hue does, and settling it first cuts the shortlist dramatically.
Beyond about three candidates, comparison stops being useful — the eye adapts and every option starts to look plausible. Three lets you judge each against the other two.
Paint large sample boards, move them around the room, and look at them in morning light, afternoon light and after dark. See the separate guide on testing a paint sample for why boards beat patches painted straight onto the wall.
Be wary of any colour recommended without reference to your room's light and fixed materials, including recommendations from this site — a calculated colour relationship is a starting point for a shortlist, never a substitute for testing. Treat 'foolproof' neutrals with particular scepticism: low-saturation colours are the most light-sensitive of all, not the safest.
How to test it
Two coats on a primed board, at least A2, moved around the room over several days. A board can be held against the skirting, next to the floor and beside the window in a way a painted patch cannot.
Undertone
The commonest failure is a wall colour whose undertone conflicts with a fixed material — a pink-grey against a yellow-toned oak floor, for instance. The two can be identical in lightness and still look wrong together.
Lighting
A colour chosen in a shop or from a screen has been seen under light that does not exist in your room. Neither is a valid basis for a decision on a large surface.
Finish
Choose the finish alongside the colour, not after it. The same colour in matt and in eggshell reads as two noticeably different depths, and the finish also determines how much the wall shows imperfections and how easily it can be cleaned.
Whatever a calculation or a chart says, view a physical sample in the actual location before committing to a large surface.
Colourwise editorial guidance, drawn from conventional decorating practice and from the physical behaviour of light and surfaces described in the linked lighting and finish guides. Not manufacturer advice — always follow the specific instructions supplied with any product you use.