Quick question:
How many are "all" of the cantrips? Core rulebook? Ultimate Magic? Various regional sourcebooks?
Assuming you mean just the core rulebook, the calculation for a spellbook's value is:
( (Ink Charge) + (Viewing Charge) ) * Number of Spells
In charges are spell level squared times 10gp (half the cost of a 1st-level spell for a cantrip, not 1/4), and the viewing charge (e.g., the normal rate a wizard charges to let you copy a spell out of his book) is the spell level squared times 5gp (again, half the cost of a 1st-level for a cantrip).
So, for a core rulebook spellbook (20 cantrips), you're looking at:
( (Ink Charge) + (Viewing Charge) ) * Number of Spells
Cantrips: ((1 * 1 * 10 / 2) + (1 * 1 * 5 / 2) * 20 = 150gp
1st-Level: ((1 * 1 * 10) + (1 * 1 * 5) * 6 = 90gp
2nd-Level: ((2 * 2 * 10) + (2 * 2 * 5) * 2 = 120gp
------------------------------
Total: 360gp
You can usually sell it for half of that amount.
Why would you? The spellbook's worth to whoever uses it (i.e. the putative buyer) isn't in the fact that the spells were scribed already
Actually, that's exactly how you calculate it.
PF SRD said:
Selling a Spellbook
Captured spellbooks can be sold for an amount equal to half the cost of purchasing and inscribing the spells within.
The designers have clarified that "purchasing," in this case, refers to this rule:
PF SRD said:
Spells Copied from Another's Spellbook or a Scroll
...
In most cases, wizards charge a fee for the privilege of copying spells from their spellbooks. This fee is usually equal to half the cost to write the spell into a spellbook (see Writing a New Spell into a Spellbook). Rare and unique spells might cost significantly more.
... and not the cost of an equivalent scroll.
EDIT2:
Also:
a Wizard preparing spells from that spellbook would still have to make checks to do it, every time.
Take. 10.
PF SRD said:
Wizard Spells and Borrowed Spellbooks
...
Once a spell from another spellcaster's book is deciphered, the reader must make a Spellcraft check (DC 15 + spell's level) to prepare the spell.
With a DC of only 15 + Spell Level, you'll be able to easily Take 10 on that check and guarantee success with only a moderate Intelligence bonus, you'll be autopassing that check in no time (you are putting ranks in Spellcraft with every Wizard level, right?).
Code:
Wizard Level | Spell Level / DC | Required Int to Autopass
---------------------------------------------------
1 | 0 / 15 | 12
1 | 1 / 16 | 14
3 | 2 / 17 | 12
5 | 3 / 18 | 10
7 | 4 / 19 | 8
... Etc.