you plan to attach a flat 1/2 in button to a garment the size of the buttonhole should be?

Perhaps 5/8ths inch? Just big enough for the button to get through; not so big that it can become unbuttoned easily.

To determine the size of the buttonhole for a 1/2 inch flat button, you will need to consider the following aspects:

1. Button Diameter: The diameter of the button refers to the distance across its widest point, which in this case is 1/2 inch, as stated.
2. Shank Depth (if applicable): Some buttons have a shank on the back, which is a loop-like projection used to attach the button securely. If your button has a shank, make sure to consider its depth as well.

To determine the appropriate size for the buttonhole, you need to create a hole that accommodates the button's diameter and, if applicable, the shank depth. A general rule of thumb is to make the buttonhole slightly larger than the button's diameter to allow it to fit comfortably without excessive tightness or looseness.

In this case, for a 1/2 inch flat button, you should consider making the buttonhole slightly larger, around 3/4 inch. This additional space provides enough room for the button to pass through the hole easily. However, it is always recommended to test the size by making a sample buttonhole on a scrap fabric or using a buttonhole gauge to ensure a proper fit before applying it to your garment.