There are span tables for this you can look up, but here is an old standby that is pretty much on the safe side.
A traditional rule of thumb often used to size headers is the "inch per foot" rule which will provide adequate strength in most cases with spans up to eight feet. For headers in single story dwellings supporting no point loads such as posts or beams, provide one inch of header depth for every foot of header length, min. 4 x 4.
"True eloquence consists in saying all that is necessary, and only that which is."
François Duc de La Rochefoucauld
Keep in mind that much more must be considered. What and where is the roof load. Best not to be guessing on this. Lumber yards can give this info since they have engineers to determine beam sizes. Ask for the correct laminated beam and they can tell you that a 2X10 can be used