Grandmas have a bunch of upgrades that, like cursors, keep them somewhat relevant as you continue to progress. However, you should keep in mind that with the ever-increasing cost of things as you get more and more - it may not be efficient to sink hours worth of cookies into a purchase that does not increase your CPS by any meaningful amount.
Grandmas can be a little tricky as some of their upgrades increase the CPS of other buildings based on the number of Grandmas, but in general a basic formula to keep in mind is:
[Cost of new building] / [CPS per building]
Because I don't know the exact numbers you're working with, I'll use some numbers from my game as an example:
- Cursor: [Each: 1.151 billion/sec] [Next: 22.416 quadrillion]
- = 19,475,239 cookies per 1cps
- Grandma: [Each: 162.299 million/sec] [Next: 137.901 trillion ]
- = 849,672 cookies per 1cps
- Farm: [Each: 23,774.2 /sec] [Next 1.4 trillion]
- = 58,887,365 cookies per 1cps
While there are far more buildings to consider, out of those three - the cost per CPS is the lowest for a grandma. This is, however, a very basic formula that does not take into consideration other factors. For example, because of my cursor upgrades, each non-cursor object gives each cursor +55,555.6cps. As I have 250 cursors, this works out to roughly 13.9 million CPS per each non-cursor, so a farm would calculate out to 100,719 cookies per 1cps which is a better deal than the grandmas.
It should be noted that while one building may be the most efficient now, every single purchase will alter the balance, so you'll have to re-calculate constantly. It can help to keep a spreadsheet.
Upgrades can be analyzed in a similar cost/benefit formula:
[Cost of upgrade] / [Expected CPS gain]
For example, my next cookie upgrade (pure black chocolate cookies) costs 50 quadrillion and would give +4% cps (4% of my current 5.5 trillion/sec works out to 220 billion per second). The efficiency of this upgrade is currently 227,273 cookies per 1cps. That's more efficient than a grandma and less than a farm (if you consider the cursor upgrades)
Another factor that can influence your decision is time - although that cookie upgrade is rather efficient for me, it will take roughly 2.5 hours to reach 50 quadrillion cookies (not counting golden cookie bonuses), so if I'm actively paying attention to the game, I may opt to spend my cookies on a less efficient upgrade that I can purchase sooner because it's cheaper.
You're going to need more of everything, and at 450million CPS, and grandmas starting at 42 billion, buying one will only set you back 1.5+ minutes worth of cookie generation. So even if it's not the most efficient choice currently, it won't set you back too far yet.