What is the power consumption of your heatbed (size) and hotend (model)?
I want to verify that it is possible to use a battery to power them.
I have a Kill-A-Watt meter so I got a pretty good measurement for you with my Anet A6. Like Petar said each model is different but this should give you a idea. When heating both the nozzle and heat bed the printer consumes 160 watts of power, once to temp it backs down to 9 watts (it also uses 9 watts when just "sitting doing nothing and is on"). When the nozzle and bed get down in temp it hits back up to 160 watts. Basically it is never a consistent heating, it is on and off. Like a refrigerator.
When it comes to heating only the nozzle the printer uses 60 watts (so 51 watts is going to the nozzle for heating).
When it comes to heating only the bed the printer uses 142 watts (133 watts to the bed).
This is interesting because it would make sense the printer needs more than 160 watts when 51 is going for the nozzle and 142 going to the bed, that 193. I make mention of this because that may suggest my power supply is not big enough and the printer could really use around 200watts.
As a little bonus when the printer is moving around (stepper motors are active) I find it using 35-40 watts (or 26-31 watts) to power the steppers.
So with all the said, is it possible to use a battery? Yes, you could. And to give a example a car battery should have 80 Amp-hours (or something like that, but we will go with it). With that battery you can get 960 Watt-hours from the battery before it dies. Going with my printer using 160 watts I will get 6 hours of printing time. But keep in mind as the battery is used the voltage will drop, so in the end the printer will be getting something like 10v which I am sure will affect heating and overall performance.
Last thing I feel that needs to be said. If using a inverter to convert the 12v battery to 110v (or whatever voltage you use) a cheap one will not be healthy for the printer. Cheap inverters put out square waves instead of sines waves. Basically it will hurt the printer. You can learn more at this WEBSITE
"Update" on mar 4 I read a comment that mentioned running right off the battery without a battery and then I thought of something that I did not think of before. And that would be protecting the battery itself
So I said you can run the printer off the battery. There was one issue that I had not thought of. And that was the voltage drop and the battery discharged. A battery usually does not have voltage-cut off to keep the battery from being overly discharged, and a printer does not have anything to measure voltage (why should it). So a simple hook up of a 3d printer to a battery is prone to drain the battery much lower than 10v, which will greatly shorten a battery life-span. This can be prevented two ways.
A circuit between battery and 3d printer. There is plenty of circuits that can be bought as long as they cut power to printer at 10v or something (for lead acid anyway) and can handle the amp draw.
A inverter can also be used because this voltage cut off is already in them. But remember that square waves are bad for the printer.