Note the words 'would be', you cannot actually tell what the next number is going to be untill you insert a record.
Why not? because databases make absolutely sure that it is not possible to insert the same number twice.
In MySQL you get auto_increment numbers that only 'update' when a record is inserted, so you cannot find out what the next number would be without inserting a record. But when you insert a record you force the number to be updated, so even though you can find out what the number was at the time you were wondering about which number it was, as soon as you find out which number it was the number has already changed.
Real databases use sequences, which do not require you to insert a record, but every time you query a sequence, it will give you a number and update itself for the next request.