MATH · LOCAL CALCULATOR

Cosine Similarity Calculator

The cosine similarity calculator calculates the cosine similarity, cosine distance, and angle between two vectors, with all its calculations shown in easy steps.

Enter values

How it works

This calculator evaluates the displayed equation variants locally in your browser. Enter the known values; results are shown for equations whose required inputs are available.

Check units, assumptions and professional guidance before using results for medical, financial, legal, engineering or safety-critical decisions.

Formulas used by this calculator

The Cosine Similarity Calculator works with 41 quantities and 20 relations between them. Enter the values you know, leave the one you want to find blank, and press Calculate. Blank fields are never treated as zero. Each formula below is solved for one quantity.

12 further rearrangements of the same relations let you solve for other quantities.

Inputs

FieldName in formulasCan be solved for
a0a0Input only
a1a1Input only
a2a2Input only
a3a3Input only
a4a4Input only
a5a5Input only
a6a6Input only
a7a7Input only
a8a8Input only
a9a9Input only
b0b0Input only
b1b1Input only
b2b2Input only
b3b3Input only
b4b4Input only
b5b5Input only
b6b6Input only
b7b7Input only
b8b8Input only
b9b9Input only
xxxxYes
ShowshowInput only
LengthlengthYes
Mag a2mag_a2Yes
Mag a3mag_a3Yes
Mag a4mag_a4Yes
Mag a5mag_a5Yes
Mag a6mag_a6Yes
Mag a7mag_a7Yes
Mag a8mag_a8Yes
Mag a9mag_a9Yes
Mag b2mag_b2Yes
Mag b3mag_b3Yes
Mag b4mag_b4Yes
Mag b5mag_b5Yes
Mag b6mag_b6Yes
Mag b7mag_b7Yes
Mag b8mag_b8Yes
Mag b9mag_b9Yes
Mag a10mag_a10Yes

1 more inputs are available in the calculator form.