How do you calculate the wavelength of electromagnetic waves?
Use the wave equation
This is a very important equation in physics and works for all types of waves, not just electromagnetic ones. It works for sound waves too, for example.
v is the velocity
f is the frequency
Now, when we're working with the electromagnetic spectrum, velocity v is always the speed of light. The speed of light is denoted c and is approximately
So, whenever we're working with the electromagnetic spectrum, you can easily determine frequency given wavelength or wavelength given frequency because the velocity is constant.