Ratings are based upon the performance potential of the boat. It is assumed to be in racing condition with a full set of racing sails by an experienced seamanlike crew. They are set by local committees based upon local conditions. In my area, they assume wind of about 10 knots. In other areas, the wind may be 8 knots, 12 knots, or whatever. You can find the same boats from different areas vary quite a bit. You can get credits... roller furling (6 sec typ), a fixed prop (3 sec/blade typ) or penalties...oversized jib (-3 sec for 160% typ) and other items.
Chances are that your boat has an established rating in your area. When it is a new boat, you have to establish the rating based upon similar boats, and then see how it does over a year or so, and adjust. Adjustments are typically 3 seconds a mile up or down at a time.
Your best bet is to do a search for a local PHRF committee, and get a rating from them.