That can vary lot with online universities because usually they have a quarter academic schedule. Quarters can be only 6 to 8 weeks long, and a bachelors degree usually requires a minimum of 180 credit hours rather than 120 credit hours. You may be taking only 2 courses per quarter for 8 credit hours, 4 credit hours per course. In addition you, may get almost NO vacation. If you want to take a gap quarter, you have to arrange for a leave of absence 2 or more quarters in advance. Online e universities are relentless. They do not care if you have a mental breakdown chronic medical conditions
They want your money and for you to graduate as soon as possible.
I've walked away from 2 online masters degree programs partly because of this.
My first not online bachelors degree took 4 years, my second took 7 semesters plus some summer terms. My third took me 2 years, but I was part-time and I had a graduate school background.