 <p>You are facing with a very common problem that most developers should know about: Integer overflow.</p> <p>Your year variable is an int, the constant for second->year conversion is constant int, so int*int is... int. Except if your year is larger than approx 68, the result cannot fit into an int. Hence - overflow and silly results. </p> <p>You have a couple of options available to you:</p> <ol> <li>Do your timestamp arithmetic in longs. Really, that's the industry standard anyway.</li> <li>If you insist on precision of over microseconds (or nano if you're concerned with last century only) - BigDecimal or BigInteger are your friends.</li> <li>Use the <code>TimeUnit</code> class from <code>concurrent</code> package. It doesn't have years, but does have days and does conversion nicely (JodaTime would be even nicer though)</li> </ol>