It really depends on how adept you are at math and how you're learning. If you're teaching yourself, it's going to take a lot more time than if you have someone teaching you. I teach math for kids in elementary-college and if you're trying to get to Calculus (you said higher grade stuff so I'm not sure what you're shooting for) I'd say around 4-5 months of coursework to bridge the gap between 8th grade and Algebra 1, then maybe a 8 months to 10 months of coursework if you worked hard for Algebra 1-2, another six months for the applicable portions of geometry, though I'd recommend skipping the majority of a traditional geometry curriculum as it's uselss (like geometric proofs), focusing on area and trigonometry. Then maybe 6 months for anything from Pre-Calculus and you could probably take on Calculus 1.
Also I'm thinking of you putting in at least an hour a day for my timeframes, it would take longer the less time you dedicated to it. If you have the option (not sure how old you are or if you're in the US) try contacting a community college near you. They might be able to lay out a list of courses you'd need to progress through, though it may be slower since you'll only be able to really take one math course per semester (they build on eachother).