2D kinematics

I am trying to make a calculator and for some reason the time is not showing right. Am I doing something wrong with my equations? I get 1.73 and the online calculator gets 1.44… My angle is 45 degrees and my velocity is 10 m/s

    vx = float.Parse(velocity.text) * Mathf.Cos(float.Parse(angle.text));
    vy = float.Parse(velocity.text) * Mathf.Sin(float.Parse(angle.text));
    time = ((2 * vy) / g);
    distance = vx * time;
    print(time);

sin() and cos() take in radians, not degrees.

so this:

Mathf.Cos(float.Parse(angle.text))

should be this:

Mathf.Cos(Mathf.Deg2Rad * float.Parse(angle.text))

… and similar for Sin() as well.