Pilots often need to calculate the headwind component of a crosswind. This information is important to them for calculations of aircraft performance. A strong headwind on take-off helps to shorten the take-off distance. On landing, a stronger headwind helps to shorten landing roll. Enroute, headwinds actually hurt by slowing down the plane's groundspeed. It can seem confusing, but the calculation of the headwind component boils down to one simple trigonometric equation.
Calculate the difference between your desired heading and the wind's heading. For example, 230 degrees minus 175 degrees is a difference of 55 degrees.
Take the cosine of that angle difference. For example, the cosine of 55 degrees is approximately 0.57.
Multiply Step 2's result by the crosswind's magnitude to end up with the headwind component. For example, if the crosswind's magnitude was 10 knots, then the headwind component is 5.7 knots.
If the answer turns out to be negative, then your headwind component is actually a tailwind.