This is a simple math conversion. The problem is how are you receiving your variable? Is it via some server side scripting (php, asp, perl, coldfusion)? Or is your only chance of converting javascript? In any way, pure HTML can't do much about it. It's just a presentation language and can't really convert values.