When will the next leap second happen?

Based on IERS Bulletin A Vol. XXXVI No. 48, and making some very large, probably unjustified assumptions;

at the end of December, 2050

And will be a negative leap second

How did you calculate that?

Based on some great work by Tony Finch, I'm parsing the text of the IERS Bulletin A notice to find the parameters provided to predict the difference between UT1 (solar time) and UTC (civil time). Once I have those values, I calculate the predicted difference going forward for the start of July and January each year until the absolute difference is more than 0.5 seconds. The Bulletin A parameters really aren't intended to be used to make predictions that far in the future, and are based on a model that assumes that the change in UT1-UTC is more or less linear, which hasn't been the case recently.

tl;dr: Magic and guesswork. Take all of this with a giant pinch of salt. Source code is available on GitHub.

This page updates automatically once a week when the new bulletin is published.

What does that mean?

Typical clocks are designed to run at a steady pace, counting out the same number of seconds every day. But reality isn't that tidy, and the rotation of the earth has actually been slowing down for most of history due to tidal friction. In order to keep the "civil" time that most people use from getting too far out of sync with solar time [1], the people in charge of UTC add an extra second to the last minute of June or December if they determine that things are getting too far out of sync.

Interestingly, Earth's rotation has recently been speeding up a bit, and towards the end of 2019 started turning faster than the metric [2] day for the first time since the 1940's. It's not entirely clear what caused this, but an interesting side effect might be the need to remove a second from UTC. This is called a "negative" leap second, and has never been done before.