The cost of reaching 99 Magic in RuneScape depends on your current level and method, but high alchemy is by far the cheapest route. You need level 55 to high alch, and from there reaching 99 takes a fire staff, a huge stack of nature runes, and a lot of patience.
As a rough example from one older calculation, getting 99 from level 55 required around 197,967 nature runes. At 304 gp each, that worked out to roughly 60 million gold. Keep in mind rune prices constantly shift, so the real figure changes. It can pay to wait for a price drop before buying in bulk.