Fixed Cost vs Variable Cost
This is pretty straightforward: which costs will vary, and which will not? For example, a venue may charge you a fixed price for the room plus per-person costs for catering - the room is a fixed cost and the catering is a variable cost because it depends on the number of people. The majority of costs can be split down to things that won't change, and those that are a per-person cost. There are cases where you'll get discounts for buying in bulk but we'll come back to dealing with those later.
In simple terms, you want to do the following:
profit = fixed cost + (number of persons * variable cost)
The aim of the game is for profit to be greater than zero - at this point you have a viable event.
Working out the Costs
Here's an example from a spreadsheet for an imaginary event, which works out both income and costs for fixed and variable items. At the bottom, we have a grid showing what the income and costs would be for particular quantities of people.
(if you want to use this spreadsheet yourself, it's public on Google Docs)
The idea is that you have both worst-case and best-case scenarios here, and that somewhere in the middle, the numbers start showing that you're not making a loss. Once you have this spreadsheet set up, you can add in costs and see what that would do to the numbers. Take out the sponsor and increase ticket prices a bit, or see the effects that not giving t-shirts will have on the bottom line*.
Some of your costs may be optional - for example I always ask how much a venue will charge to serve cake alongside the coffee. If I get enough attendees that the number looks healthy, then we have cake! However the event is viable even before that - this spreadsheet doesn't take this into account but you could extend it to handle more complex scenarios.
* Never underestimate the power of an entitled event attendee. When I heard how much was charged for coffee at an event I attended, I suggested the organisers bought us all water bottles instead. They paid for the coffee and I still saw a lot of people bitching on twitter that the coffee wasn't available when a session finished early.