Measure the opening for which the header will hold weight, using a tape measure. If you will be putting in a new window or door, you can use its dimensions to calculate the header size.
Figure out the type of header you'll need. If you are creating an opening no wider than 4 feet, for a door or smaller window, then you need a 2-by-6 header. If you are putting in an opening between 4 and 5 feet wide, then you'll need two 2-by-8 headers. If the opening will be 5 to 6 feet wide, such as for double doors, then you will need two 2-by-10 headers. For an opening 6 to 7 feet wide, you will need two 2-by-12 headers.
Take your calculations to city hall and ask an engineer or the person in charge of local building codes to check your work and give the go-ahead for your construction.