Most web agencies lose 15–25% of project margin not because they quoted badly, but because they never measure where the hours actually go...
The fix is simpler than you think: consistent time tracking at the service level, weekly review of budget vs actual, and a hard rule about change requests...