# What is the formula for calculating the private key? resued R value

What is the formula for calculating the private key? I want the equation in detail to try to solve it on cocalc

I want an equation to extract the private key from two different addresses I have tried K ((z1 * s2 - z2 * s1) / (r * (s1-s2))) And it didn't work

These are the data for the transactions

tx/ 952730ab31f6e9949343bc186484f95168fa6842489e89b5b48500c54818c683

"sigR": "6fcf15e8d272d1a995af6fcc9d6c0c2f4c0b6b0525142e8af866dd8dad4b", "sigS": "7b4bde105608e96da63b54288a5dae961fc074008f4fc9c79d4e486fb9d4bc0b", "sigZ": "c49cc0d0ef2a72386e63d28a319e58dc0258dacedf9f7858619a615bb20cd8f6", "pubKey": "02a0d204d69210b21d79c60b506b27259c314f0c64ea24d419696722ea285db1f1",

tx/ cf7a5114e0036d98c531538885b4c906a47d74a615721d620b3c53d4f7c43856

However, if you know the `k` value that caused this R value, which you would if you're the creator of at least one of these transactions, you should be able to extract the private key of the other by using the same method but skipping the derivation of k steps.