Acos Function




d (required; Double or any valid numeric expression)

A cosine, which is a number greater than or equal to -1 and less than or equal to 1

Return Value

A Double between 0 and pi that is the arccosine of d in radians


Returns the arccosine of d in radians

Rules at a Glance

  • If d is out of range (less than -1 or greater than 1), Acos returns NaN.

  • This is a Shared member, so it can be used without creating any objects.

Programming Tips and Gotchas

To convert from radians to degrees, multiply by 180/pi.

VB.NET/VB 6 Differences

The Acos function did not exist in VB 6.

Get VB.NET Language in a Nutshell, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.