Fictional workshop budget. All amounts are GBP. Revenue=attendees*ticket_price. Cost=fixed_cost+attendees*variable_cost_per_attendee. Surplus=revenue-cost. Break-even attendees=ceil(fixed_cost/(ticket_price-variable_cost_per_attendee)) when margin is positive; if ticket price is no greater than variable cost, show Not reachable from ticket sales. Flag a positive break-even count greater than capacity. Fixed cost >=0; ticket price >=0; variable cost >=0. Attendees and capacity are whole numbers; 0<=attendees<=capacity, 1<=capacity<=300. Empty, non-numeric and non-finite values are invalid, not zero. A negative fixed cost is invalid. Display errors and hide stale results. Do not fetch remote resources, store data, send information, create hosting or publish. This is a local practice tool, not financial advice.
Worked example: 20 attendees, capacity30, fixed450, variable12, ticket35 => revenue700,cost690,surplus10,break-even20.
