Measure the walls
Measure the length of each wall and add them together to get the perimeter. For a rectangular room, that is twice the length plus twice the width. Measure the height from the top of the skirting board to the ceiling.
For paint
Multiply the perimeter by the height to get the wall area, then take off the doors and windows. A typical internal door is around 1.9 square metres. Divide the area by the coverage on the tin, then multiply by the number of coats. A 4.2m by 3.6m room with 2.4m walls, one door and one window has about 34 square metres of wall, so two coats at 12 square metres per litre needs about 5.7 litres.
For wallpaper
Wallpaper is worked out in drops. Each drop is the wall height plus the pattern repeat plus a little for trimming. A standard UK roll is 10.05m long and 53cm wide, so with 2.4m walls and a 53cm repeat you get three full drops per roll. Divide the perimeter, less some width for doors and windows, by the roll width to find how many drops you need.
Buy from one batch
Paint and wallpaper colours vary slightly between production batches. Check the batch number on every roll or tin, and buy a spare roll of wallpaper at the same time.