According to one embodiment, a calculating device includes a nonlinear oscillator. The nonlinear oscillator includes a circuit part including a first Josephson junction and a second Josephson junction, and a conductive member including a first terminal. An electrical signal is input to the first terminal. The electrical signal includes a first signal in a first operation. The first signal includes a first frequency component having a first frequency, and a second frequency component having a second frequency. The first frequency is 2 times an oscillation frequency of the nonlinear oscillator. An absolute value of a difference between the first frequency and the second frequency is not more than 0.3 times the first frequency.