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.
- Length (
length) = xx
- xx (
xx) = length
- Mag a2 (
mag_a2) = (pow(a0, 2) + pow(a1, 2))
- Mag b2 (
mag_b2) = (pow(b0, 2) + pow(b1, 2))
- Mag a3 (
mag_a3) = (pow(a2, 2) + (pow(a0, 2) + pow(a1, 2)))
- Mag b3 (
mag_b3) = (pow(b2, 2) + (pow(b0, 2) + pow(b1, 2)))
- Mag a4 (
mag_a4) = (pow(a3, 2) + (pow(a2, 2) + (pow(a0, 2) + pow(a1, 2))))
- Mag b4 (
mag_b4) = (pow(b3, 2) + (pow(b2, 2) + (pow(b0, 2) + pow(b1, 2))))
12 further rearrangements of the same relations let you solve for other quantities.
Inputs
| Field | Name in formulas | Can be solved for |
| a0 | a0 | Input only |
| a1 | a1 | Input only |
| a2 | a2 | Input only |
| a3 | a3 | Input only |
| a4 | a4 | Input only |
| a5 | a5 | Input only |
| a6 | a6 | Input only |
| a7 | a7 | Input only |
| a8 | a8 | Input only |
| a9 | a9 | Input only |
| b0 | b0 | Input only |
| b1 | b1 | Input only |
| b2 | b2 | Input only |
| b3 | b3 | Input only |
| b4 | b4 | Input only |
| b5 | b5 | Input only |
| b6 | b6 | Input only |
| b7 | b7 | Input only |
| b8 | b8 | Input only |
| b9 | b9 | Input only |
| xx | xx | Yes |
| Show | show | Input only |
| Length | length | Yes |
| Mag a2 | mag_a2 | Yes |
| Mag a3 | mag_a3 | Yes |
| Mag a4 | mag_a4 | Yes |
| Mag a5 | mag_a5 | Yes |
| Mag a6 | mag_a6 | Yes |
| Mag a7 | mag_a7 | Yes |
| Mag a8 | mag_a8 | Yes |
| Mag a9 | mag_a9 | Yes |
| Mag b2 | mag_b2 | Yes |
| Mag b3 | mag_b3 | Yes |
| Mag b4 | mag_b4 | Yes |
| Mag b5 | mag_b5 | Yes |
| Mag b6 | mag_b6 | Yes |
| Mag b7 | mag_b7 | Yes |
| Mag b8 | mag_b8 | Yes |
| Mag b9 | mag_b9 | Yes |
| Mag a10 | mag_a10 | Yes |
1 more inputs are available in the calculator form.