ASME VIII Div.1 - Design of flanges
This sheet may be used for both design and verification purposes. For the design stage you should set only the data in blue. After doing so, data in green, such as number of bolts or flange thickness, will contain minimum values corresponding to the design criteria. At that point you should set data in green to your design values, to get the final verification
Please note that a suitable design may not be defined for any set of data, and particularly for any bolt size. If you don't get satisfactory results, try increasing the bolt size